synchronization in python

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nil111181
    New Member
    • Apr 2007
    • 5

    #1

    synchronization in python

    hello,
    i want to synchronize the set of statement in python
    it is working on the threading so when one thread is running then the other start running so the no generation become wrong due to the 2 thread
    so i want to execute one by one thread
    we cant do any thing to thread it is pre define architecture
    so we just do lock the resource

    thank u
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    Originally posted by nil111181
    hello,
    i want to synchronize the set of statement in python
    it is working on the threading so when one thread is running then the other start running so the no generation become wrong due to the 2 thread
    so i want to execute one by one thread
    we cant do any thing to thread it is pre define architecture
    so we just do lock the resource

    thank u
    Polling a threading.queue is one way to create a semifore.

    Comment

    • nil111181
      New Member
      • Apr 2007
      • 5

      #3
      Originally posted by bartonc
      Polling a threading.queue is one way to create a semifore.
      thank u for reply but i can't undestand i m new in python so if possible send me code for that

      Thank u

      Nilesh patel

      Comment

      • bartonc
        Recognized Expert Expert
        • Sep 2006
        • 6478

        #4
        Originally posted by nil111181
        thank u for reply but i can't undestand i m new in python so if possible send me code for that

        Thank u

        Nilesh patel
        Hi, Nilesh. I hope that this link will provide a basic understanding of multi-threading.

        Comment

        • nil111181
          New Member
          • Apr 2007
          • 5

          #5
          Originally posted by bartonc
          Hi, Nilesh. I hope that this link will provide a basic understanding of multi-threading.
          thank u for reply
          my problem is now solved

          thank u again

          Comment

          • bartonc
            Recognized Expert Expert
            • Sep 2006
            • 6478

            #6
            Originally posted by nil111181
            thank u for reply
            my problem is now solved

            thank u again
            You are welcome. I hope that I was of some help.

            Comment

            Working...