acquire


Description:

public bool acquire ()

Tries to become the owner of the specified context.

If some other thread is the owner of the context, returns false immediately. Ownership is properly recursive: the owner can require ownership again and will release ownership when release is called as many times as acquire.

You must be the owner of a context before you can call prepare, query, check , dispatch.

Parameters:

this

a MainContext

Returns:

true if the operation succeeded, and this thread is now the owner of this .