The protection of resources

Discussion in 'Python' started by Krisztian Kepes, Jul 28, 2003.

  1. Hi !

    In this time I use the Lock() for thread synchronization, and resource

    protection.

    But in the new project I must reorganize this thing.
    The program must be run in lin/win, so I cannot use the winapi.

    I need to protect resources from concurrent r/w.
    Possible that the modules are not threads but are tasks.

    In the Delphi and WinAPI I use the Mutex, that is a simple, opsystem
    protected thing to signaling.
    It is a simple signal (1/0).

    I search for this in python, but I see only mutex with "procedure
    queue".
    I cannot see a signal like thing.
    I want to only signaling: the resource are taken or not.
    I don't want to wait for the non used state (not block !).

    So these my questions:
    - 1. How to use the py mutex object ? Please send an example to me !
    - 2. Have the py an signal object ? (platform !!!)
    - 3. Is any solution is a file locking. Have the py a possibility of
    exclusive
    file opening ?


    Thx:
    KK
     
    Krisztian Kepes, Jul 28, 2003
    #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. Gerald Newton3

    Seeking Internet Protection Service

    Gerald Newton3, Dec 8, 2004, in forum: Perl
    Replies:
    0
    Views:
    414
    Gerald Newton3
    Dec 8, 2004
  2. Gerald Newton3

    Seeking Internet Protection Service

    Gerald Newton3, Dec 8, 2004, in forum: Perl
    Replies:
    1
    Views:
    448
    Gregory Toomey
    Dec 9, 2004
  3. Gerald Newton3

    Seeking Internet Protection Service

    Gerald Newton3, Dec 8, 2004, in forum: Perl
    Replies:
    4
    Views:
    466
    Gerald Newton3
    Dec 9, 2004
  4. g
    Replies:
    69
    Views:
    2,201
    Oliver Wong
    Apr 25, 2006
  5. Russell E. Owen
    Replies:
    0
    Views:
    713
    Russell E. Owen
    Sep 8, 2006
Loading...

Share This Page