1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

tty_yield(0)?

Discussion in 'Plugins' started by vefatica, Mar 19, 2011.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,785
    Likes Received:
    29
    I have often used tty_yield(0) in a loop while waiting for something to happen, and wanting thread messages to be processed (e.g., if I have SetWinEventHook() and I'm waiting for the hook process to SetEvent()).

    For that purpose, I find that (simply)

    Code:
    PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)
    works as well. I'm curious ... what else does tty_yield(0) do?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,730
    Likes Received:
    80
    Nothing, if you pass 0. If you pass 1, it's a whole different ballgame. (But that's not anything you should be doing anyway!)
     

Share This Page