Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.realtime.server.wakeWaitingThreads
on wakeWaitingThreads (username=nil) { <<Changes <<9/25/10; 12:18:06 PM by DW <<Add optional username parameter. If non-nil, only wake threads for user with that name. <<8/15/10; 8:45:03 PM by DW <<Created. Wake up all the waiting threads so they can return local (adrlongpolls = @system.temp.realtime.server.longpolls); if defined (adrlongpolls^) { local (adrtable); on wake (adrtable) { if adrtable^.enabled { try { local (id = adrtable^.idthread); if thread.exists (id) { thread.wake (id)}}}}; for adrtable in adrlongpolls { if username == nil { wake (adrtable)} else { if adrtable^.username == username { wake (adrtable)}}}}}; bundle { //test code wakeWaitingThreads ("davewiner")}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.