0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

c++ builder XE4, 10.2 Tokyo | TThread > スレッド番号を取得 > DWORD tid = GetCurrentThreadId();

Last updated at Posted at 2016-03-06
動作確認
C++ Builder XE4
  - Windows 7 pro 32bit
Rad Studio 10.2 Tokyo Update 2 (追記: 2017/12/27)
  - Windows 10 pro 64bit

TThreadで動かしているスレッドは「スレッドの状態」タブにて動作中などの情報が見れる。
名前付きスレッドでない場合は、どのスレッドがどの番号で動いているか確認しないといけない。

以下で調べられる。

DWORD tid = GetCurrentThreadId();

Execute()などで上記tid をデバッグ出力しておけば、「スレッドの状態」タブでの対応がとれる。

qiita.png

名前付けスレッドも使えばいいように思うが未調査。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?