Skip to content

create_eventCreateEventCreateEventcreate_eventT_create_event🔗

説明🔗

create_eventCreateEventCreateEventcreate_eventT_create_event — イベント同期オブジェクトを作成する。

書式🔗

create_event( attribute.name AttribName, attribute.value AttribValue, out event EventHandle )void CreateEvent( const HTuple& AttribName, const HTuple& AttribValue, HTuple* EventHandle )static void HOperatorSet.CreateEvent( HTuple attribName, HTuple attribValue, out HTuple eventHandle )def create_event( attrib_name: MaybeSequence[Union[int, float, str]], attrib_value: MaybeSequence[Union[int, float, str]] ) -> HHandle

Herror T_create_event( const Htuple AttribName, const Htuple AttribValue, Htuple* EventHandle )

void HEvent::HEvent( const HTuple& AttribName, const HTuple& AttribValue )

void HEvent::HEvent( const HString& AttribName, const HString& AttribValue )

void HEvent::HEvent( const char* AttribName, const char* AttribValue )

void HEvent::HEvent( const wchar_t* AttribName, const wchar_t* AttribValue ) (Windows only)

public HEvent( HTuple attribName, HTuple attribValue )

public HEvent( string attribName, string attribValue )

void HEvent::CreateEvent( const HTuple& AttribName, const HTuple& AttribValue )

void HEvent::CreateEvent( const HString& AttribName, const HString& AttribValue )

void HEvent::CreateEvent( const char* AttribName, const char* AttribValue )

void HEvent::CreateEvent( const wchar_t* AttribName, const wchar_t* AttribValue ) (Windows only)

void HEvent.CreateEvent( HTuple attribName, HTuple attribValue )

void HEvent.CreateEvent( string attribName, string attribValue )

説明🔗

イベントは、スレッドに属していないあらかじめロックされた ミューテックス(相互排他)です。 つまり、ロックしているスレッドとは異なるスレッドがイベントにシグナ ルできます。これは、 WIN32-API のイベントの定義や POSIX スレッドの カウントが 0 のセマフォなどに近い考えのものです。

create_eventCreateEvent は、 AttribNameattribNameattrib_name と AttribValueattribValueattrib_value で指定された属性に基づいて、イベントオブジェク トを割り当てて初期化します。 AttribNameattribNameattrib_name は属性クラスを指定 し、 AttribValueattribValueattrib_value はイベントの種類を指定します。 下記にクラスでサポートされているすべてのミューテックスの種類をリストします。

  • ''""空の文字列 (''"") は、デフォルトの属性を設定します。

  • 'type'"type" は、スレッドがイベントへのシグナルを待つ場合 に行う処理を指定します。

    • 'sleep'"sleep" は、スレッドの呼び出しを中断します(デフォルト)。

    • 'spin'"spin" は、シグナルのビジー状態を 待機する高速なイベントを実装したものです。このタイプには、再帰(recusive)は ありません。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

AttribNameattribNameattrib_name (input_control) attribute.name(-array) → (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)MaybeSequence[Union[int, float, str]]Htuple (char* / Hlong / double)

ミューテックス属性の名前

初期値: [][]
値のリスト: 'type'"type"

AttribValueattribValueattrib_value (input_control) attribute.value(-array) → (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)MaybeSequence[Union[int, float, str]]Htuple (char* / Hlong / double)

ミューテックス属性の値

要素数: AttribValue == AttribName
初期値: [][]
値のリスト: 'sleep', 'spin'"sleep", "spin"

EventHandleeventHandleevent_handle (output_control) event → (handle)HTuple (HHandle)HEvent, HTuple (IntPtr)HHandleHtuple (handle)

イベント同期オブジェクト

結果🔗

create_eventCreateEvent は、すべてのパラメーターが正しい場合に 2 (H_MSG_TRUE) を返します。 必要に応じて、例外が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

後処理の候補

wait_eventWaitEvent, signal_eventSignalEvent, clear_eventClearEvent

関連項目

clear_eventClearEvent

モジュール🔗

Foundation