nn::nex::Core::ThreadMode Enumerated Type

Syntax

enum ThreadMode;

Value

Value Description
ThreadModeUndefined This is the default.
ThreadModeSafeTransportBuffer Sets the mode to thread-safe transport buffer thread mode. The blocking time of the dispatch process (which is long when sending and receiving) has been greatly improved by sending and receiving using a transport buffer thread in the library. Mutual exclusion is enabled within the library and most API functions are thread-safe, with some exceptions. For more information, see Initialization Settings (Thread Models, Exclusive Control, and Local Communication) in the NEX Programming Manual. You must run the Scheduler::Dispatch function periodically on the application side. When specifying this, maxSessions of SocketInitialize must be 4. In addition, you must increase the buffer region for the corresponding Socket.
ThreadModeUnsafeTransportBuffer Sets the mode to thread-unsafe transport buffer thread mode. The blocking time of the dispatch process (which is long when sending and receiving) has been greatly improved by sending and receiving using a transport buffer thread in the library. Mutual exclusion is disabled within all but some parts of the library and processing is faster. You must run the Scheduler::Dispatch function periodically on the application side. Locking is not performed, so use all the NEX APIs from a single thread or perform locking on the application side, as appropriate. This thread mode is superior in terms of both processing speed and blocking time. When specifying this value, the maxSessions parameter of SocketInitialize must be 4. In addition, you must increase the buffer region for the corresponding Socket.
ThreadModeUnsafeUser Sets the mode to thread-unsafe user thread mode. User threads are used for both dispatching and communication processes. Mutual exclusion inside the library is disabled to improve processing speed. Any necessary mutual exclusion must be handled by the application. This thread mode is superior in terms of processing speed. However, socket processing can block for several milliseconds, so call NEX APIs on a separate thread from the main thread.

Description

The enumerator type for threads settings according to the purpose. It is used as the argument for the SetThreadMode function.

A value other than ThreadModeUndefined must be set.

Revision History

2014/01/16
Changed to enable the use of ThreadModeUnsafeUser.
2013/07/16
Revised the description of ThreadModeSafeTransportBuffer.
2012/01/26
Initial version.

CONFIDENTIAL