Re: Pass data to a subprocess

Discussion in 'Python' started by andrea crotti, Jul 31, 2012.

  1. >
    >
    > def procs():
    > mp = MyProcess()
    > # with the join we are actually waiting for the end of the running time
    > mp.add([1,2,3])
    > mp.start()
    > mp.add([2,3,4])
    > mp.join()
    > print(mp)
    >


    I think I got it now, if I already just mix the start before another
    add, inside the Process.run it won't see the new data that has been
    added after the start.

    So this way is perfectly safe only until the process is launched, if
    it's running I need to use some multiprocess-aware data structure, is
    that correct?
    andrea crotti, Jul 31, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. andrea crotti

    Pass data to a subprocess

    andrea crotti, Jul 31, 2012, in forum: Python
    Replies:
    0
    Views:
    177
    andrea crotti
    Jul 31, 2012
  2. Laszlo Nagy

    Re: Pass data to a subprocess

    Laszlo Nagy, Jul 31, 2012, in forum: Python
    Replies:
    0
    Views:
    173
    Laszlo Nagy
    Jul 31, 2012
  3. andrea crotti

    Re: Pass data to a subprocess

    andrea crotti, Jul 31, 2012, in forum: Python
    Replies:
    0
    Views:
    146
    andrea crotti
    Jul 31, 2012
  4. Laszlo Nagy

    Re: Pass data to a subprocess

    Laszlo Nagy, Aug 1, 2012, in forum: Python
    Replies:
    13
    Views:
    311
    Dennis Lee Bieber
    Aug 2, 2012
  5. andrea crotti

    Re: Pass data to a subprocess

    andrea crotti, Aug 1, 2012, in forum: Python
    Replies:
    0
    Views:
    164
    andrea crotti
    Aug 1, 2012
Loading...

Share This Page