Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: Making Threads Wait for Other Thread's Results
From: "Patrick Donnelly" <batrick.donnelly () gmail com>
Date: Fri, 6 Jun 2008 17:23:19 -0600

Some more information on this:

The function nmap.mutex will take an "object" parameter. This can be
any data type except nil, booleans, and numbers. This is to provide a
large degree of flexibility (as I see these mutexes can be used for
many things). The function returned by nmap.mutex will have four
different options associated with it: "lock", "done", "trylock", and
"running". Lock is a blocking lock on the mutex. "done" releases the
lock on the mutex (errors if you do not have the lock). "trylock" is a
non blocking lock on the mutex; it returns true if you got the lock
and false otherwise. "running" returns nil or the thread currently
locked on the mutex. "running" should only be used for debugging as it
interferes with finished threads being properly garbage collected.


-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant

Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]