×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    20

    Question yield lock signal wait...

    Can some one write a Dummys guid on all those functions ? Or is it just me who are stupid

    e32.ao_yield()
    e32.ao_lock()
    lock.wait()
    lock.signal()

    Have I missed any of the confusing functions..

  2. #2
    Regular Contributor
    Join Date
    Dec 2004
    Location
    Czech Republic
    Posts
    50
    e32.Ao_lock - that's class, not function. Also notice that it is "Ao_lock", python is case sensitive. Lock is used to ... eh, "lock" the app. Simply, that the application waits for the events. If you just created some app that would show a listbox, and wanted user to select one, and you didn't use lock, the listbox would show and immediately the application would close. So you simply use the lock:

    Code:
    lock = e32.Ao_lock()
    (here would you create and show the listbox - if you were doing the example I was talking about)
    lock.wait()
    (and now, the application waits for the events)
    
    
    
    (anotherwhere, for example in exit key handler)
    lock.signal()
    (the application stops waiting for the events and continues with the code behind "lock.wait()" )
    about ao_yield: I dont know, I understand this function neither

  3. #3
    Registered User
    Join Date
    Apr 2004
    Posts
    20
    Okey thanks..

  4. #4
    Regular Contributor
    Join Date
    Jan 2005
    Location
    Bangkok, Thailand
    Posts
    148
    ao_yield will do (almost) nothing to your app.
    You typically call it after a long import.
    It will allow other UI events to run for a short while, then return back to your app.

  5. #5
    Registered User
    Join Date
    Feb 2005
    Posts
    10
    Originally posted by korakotc
    ao_yield will do (almost) nothing to your app.
    You typically call it after a long import.
    It will allow other UI events to run for a short while, then return back to your app.
    What's actually useful is to call it before a long import.

    -Ken

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×