Difference between revisions of "NET:LavishVMAPI.Frame.TryLock"
Jump to navigation
Jump to search
m (NET:LavishVMAPI.Frame.FrameTryLock moved to NET:LavishVMAPI.Frame.TryLock) |
|||
Line 2: | Line 2: | ||
See [[NET:Concepts:Frame Locking|Frame Locking]]. | See [[NET:Concepts:Frame Locking|Frame Locking]]. | ||
− | + | TryLock attempts to acquire a non-exclusive lock on the current frame, such that the frame will not complete until the lock is released via | |
[[NET:LavishVMAPI.Frame.FrameUnlock|FrameUnlock]]. This also ensures that the host application (e.g. game) is not making modifications to relevant game objects. If the lock cannot be ''immediately'' acquired, for example due to the game currently processing a frame, or another thread acquiring an exclusive lock, the call fails and returns false. | [[NET:LavishVMAPI.Frame.FrameUnlock|FrameUnlock]]. This also ensures that the host application (e.g. game) is not making modifications to relevant game objects. If the lock cannot be ''immediately'' acquired, for example due to the game currently processing a frame, or another thread acquiring an exclusive lock, the call fails and returns false. | ||
Line 11: | Line 11: | ||
=== Fully Qualified Name === | === Fully Qualified Name === | ||
− | ; LavishVMAPI.Frame. | + | ; LavishVMAPI.Frame.TryLock |
*[[NET:Lavish.InnerSpace.dll#LavishVMAPI_namespace|LavishVMAPI namespace]] | *[[NET:Lavish.InnerSpace.dll#LavishVMAPI_namespace|LavishVMAPI namespace]] | ||
** [[NET:Lavish.InnerSpace.dll#Frame|Frame class]] | ** [[NET:Lavish.InnerSpace.dll#Frame|Frame class]] | ||
− | *** | + | *** TryLock function |
== Declaration == | == Declaration == | ||
− | static public bool | + | static public bool TryLock(); |
=== Parameters === | === Parameters === |
Latest revision as of 18:42, 19 January 2007
Contents
Overview
See Frame Locking.
TryLock attempts to acquire a non-exclusive lock on the current frame, such that the frame will not complete until the lock is released via FrameUnlock. This also ensures that the host application (e.g. game) is not making modifications to relevant game objects. If the lock cannot be immediately acquired, for example due to the game currently processing a frame, or another thread acquiring an exclusive lock, the call fails and returns false.
There must be one unlock call per successful lock call.
Reference Library
Fully Qualified Name
- LavishVMAPI.Frame.TryLock
- LavishVMAPI namespace
- Frame class
- TryLock function
- Frame class
Declaration
static public bool TryLock();
Parameters
None
Return Value
- bool
- true if the lock was successfully acquired, false if not