• Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Register
  • Login
MakerGram Logo

MakerGram

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  1. Home
  2. jerinisready
  3. Posts
J
  • Profile
  • Following 0
  • Followers 0
  • Topics 0
  • Posts 2
  • Best 1
  • Controversial 0
  • Groups 0

Posts made by jerinisready

  • RE: Multi Thread Handling for normal Processes using python

    @kowshik1729
    that's builtin at python. only thing is. you can simply import using

    from multiprocessing import Process
    def my_function_to_run(*args, **kwargs):
         ...
         ...
    
    def main():
        p1 = Process(
                       target=my_function_to_run, 
                       args=('arg_01', 'arg_02', 'arg_03', ), 
                       kwargs={'key': 'value', 'another_key':True}
        )
        p1.start()
        p2 = Process(
                       target=my_function_to_run, 
                       args=('arg_01', 'arg_02', 'arg_03', ), 
                       kwargs={'key': 'value', 'another_key':True}       
        )
        p2.start()
        
        p1.join()
        p2.join()
        print("Finished!")
    
    if __name__ == '__main__':
       main()
    

    This Might can help: https://docs.python.org/2/library/multiprocessing.html

    posted in Raspberry Pi
    J
    jerinisready
    20 Sept 2019, 12:38
  • RE: Multi Thread Handling for normal Processes using python

    I suggest you multiprocessing to handle dlifferent processes.
    Use multiprocessing.Process.
    If you want to establish a communication between parent and child process, use multiprocessing.Queue or multiprocessing.Pipe

    posted in Raspberry Pi
    J
    jerinisready
    20 Sept 2019, 04:38

Recent Posts

  • @Neha-Kamal Nice one, Can you share the project link also here. Thanks 🙌.

    20 Jul 2025, 06:13 • read more
By MakerGram | A XiStart Initiative | Built with ♥ NodeBB
Copyright © 2023 MakerGram, All rights reserved.
Privacy Policy | Terms & Conditions | Disclaimer | Code of Conduct