MS Windowsでのみ動作するApacheモジュールを開発します。Apacheモジュールでワーカースレッドを1つだけ作成する方法は?
パーマネントシステムの監視タスクを実行し、グローバル変数に結果を格納する、1つのaddidtionスレッドを生成する必要があります。これらの変数は、後続のHTTP GET要求によって読み取られます。
私はhThreadは、モジュールのグローバル変数、 ではなく一つの追加のスレッドで私は2つを得る
if(hThread == 0) {
print(L"creating thread\n");
hThread= CreateThread(0, 0, thread, 0, 0, 0);
if(hThread != 0) {
print(L"thread created\n");
} else {
printLastError();
}
}
を使用して
static void ite_mymodule_register_hooks(apr_pool_t *p)
でスレッドを開始? それを防ぐには?