PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Summary table about the operating mode of event
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Modifies the status of an event.
Versions 19 and later
Linux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
New in version 19
Linux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
Linux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
Example
// Create an event
EventCreate("Let's go", eventManual, eventClose)
// Run a first thread
ThreadExecute("Thread1", threadNormal, "Thread_First")
// Locks the current thread until the event is obtained
ThreadWaitSignal()
 
// Run a second thread
ThreadExecute("Thread2", threadNormal, "Thread_Second")
// Locks the current thread until the event is obtained
ThreadWaitSignal()
 
// Modifies the event to run the threads
EventChange("Let's go", eventOpen)
//----------------------------------------------
PROCEDURE Thread_First()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("Let's go")
Trace(dbgInfo(dbgProcess) + " - Event received")
//--------------------------------------------
PROCEDURE Thread_Second()
Trace(dbgInfo(dbgProcess) + " - ThreadSendSignal(threadMain)")
ThreadSendSignal(threadMain)
EventWait("Let's go")
Trace(dbgInfo(dbgProcess) + " - Event received")
Syntax
EventChange(<Event> [, <New status>])
<Event>: Character string (with quotes)
Name of the event to modify. If this event does not exist, it is automatically created with the default options (automatic mode) and in the specified status.
<New status>: Optional constant
Status of the event:
eventOpen
(Default value)
Opens the event. If threads are waiting for the event, they are automatically unlocked.
Versions 20 and later
This constant is equivalent to EventOpen.
New in version 20
This constant is equivalent to EventOpen.
This constant is equivalent to EventOpen.
eventCloseCloses the event.
Versions 20 and later
This constant is equivalent to EventClose.
New in version 20
This constant is equivalent to EventClose.
This constant is equivalent to EventClose.
eventOpenAndCloseOpens the event, unlocks all the pending threads and closes the event. This constant is not recommended. It is kept for backward compatibility.
Remarks

Summary table about the operating mode of event

Value of EventChangeAutomatic event (by default)Manual event
eventOpenA single thread is processed by the event.
The event is automatically closed once the thread is processed.
Pending threads: If there is no pending thread, the event remains open until the next thread, then it is closed.
New threads: The new threads are added to the pending queue.
The event is opened.
Pending threads: All the pending threads are processed.
New threads: If other threads arrive while the event is still open, they are processed.
eventOpenAndClose This constant is not recommended. It is kept for backward compatibility.A single thread is processed by the event.
The event is automatically closed once the thread is processed.
Pending threads: If there is no pending thread, the event remains closed.
New threads: The new threads are added to the pending queue.
All the threads are processed by the event.
The event is automatically closed once all the threads are processed.
New threads: The new threads are added to the pending queue.
eventCloseThe event remains closed.
New threads: The new threads are added to the pending queue.
The event is closed.
New threads: The new threads are added to the pending queue.
Component : wd240vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment