1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] get processid of a function in python

Discussão em 'Python' iniciado por Stack, Maio 8, 2025.

  1. Stack

    Stack Membro Participativo

    I have two functions in my python script

    def func1():
    #This does some processing and returns xyz informaiton
    return "..."

    def func2():
    #This also does some other kind of prcessing and returns some info
    return "#...#"


    More details on the functions :-

    the function1 is checking a filepath location in adls and checking if a certain number of files have arrived. the function2 should keep checking if this process of this func1 is finished(which means all files arrived) then do some processing on those files. I want tocheck what is the processid of func1 and further in the code want to do the following

    1. Check processid of func1.
    2. Inside func2 keep checking if this processid is still running
    3. inside func2 once this processid is completed kill this process..

    I am not sure how to achieve this in python.

    Continue reading...

Compartilhe esta Página