mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 01:25:33 -07:00
Add automatically-generated names to threads
This commit is contained in:
@@ -14,9 +14,10 @@ struct event_cpp11_t {
|
||||
extern "C" {
|
||||
|
||||
thread_t *
|
||||
thread_create(void (*thread_rout)(void *param), void *param)
|
||||
thread_create_named(void (*thread_rout)(void *param), void *param, const char *name)
|
||||
{
|
||||
auto thread = new std::thread([thread_rout, param] {
|
||||
auto thread = new std::thread([thread_rout, param, name] {
|
||||
plat_set_thread_name(NULL, name);
|
||||
thread_rout(param);
|
||||
});
|
||||
return thread;
|
||||
|
||||
Reference in New Issue
Block a user