Bull DPX/20 Guida Utente Pagina 388

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 424
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 387
5-20 SOMobjects Base Toolkit Programmers Reference
Manual
someReleaseEManSem Method
Purpose
Releases the semaphore obtained by the someGetEManSem method.
IDL Syntax
void someReleaseEManSem ( );
Description
When EMan is used on OS/2, multiple threads can invoke methods on EMan concurrently.
EMan protects its internal data by acquiring SOM toolkit semaphores. The same
semaphores are made available to users of EMan through the methods
someGetEManSem and someReleaseEManSem. If an application desires to prevent
EMan’s event processing from interfering with its own activity (in another thread, of course),
then it can call the someGetEManSem method and acquire EMan semaphores. EMan
activity will resume when the application thread releases the same semaphores by calling
someReleaseEManSem.
Callers should not hold this semaphore for too long, since it essentially stops EMan activity
for that duration and may cause EMan to miss some important event processing. The
maximum duration for which one can hold this semaphore depends on how frequently
EMan must process events.
On AIX or Windows, calling this method has no effect.
Parameters
receiver A pointer to an object of class SOMEEMan.
ev A pointer to the Environment structure for the calling method.
Example
#include <eman.h>
SOMEEMan *EManPtr;
Environment *Ev;
...
_someGetEManSem(EManPtr, Ev);
/* Do the work that needs mutual exclusion with EMan */
_someReleaseEManSem(EManPtr, Ev);
Original Class
SOMEEMan
Related Information
Methods: someGetEManSem
Vedere la pagina 387
1 2 ... 383 384 385 386 387 388 389 390 391 392 393 ... 423 424

Commenti su questo manuale

Nessun commento