| 469 | static TP_pool *pool; |
| 470 | |
| 471 | static bool tp_init() |
| 472 | { |
| 473 | |
| 474 | #ifdef _WIN32 |
| 475 | if (threadpool_mode == TP_MODE_WINDOWS) |
| 476 | pool= new (std::nothrow) TP_pool_win; |
| 477 | else |
| 478 | pool= new (std::nothrow) TP_pool_generic; |
| 479 | #else |
| 480 | pool= new (std::nothrow) TP_pool_generic; |
| 481 | #endif |
| 482 | if (!pool) |
| 483 | return true; |
| 484 | if (pool->init()) |
| 485 | { |
| 486 | delete pool; |
| 487 | pool= 0; |
| 488 | return true; |
| 489 | } |
| 490 | #ifdef _WIN32 |
| 491 | init_win_aio_buffers(max_connections); |
| 492 | #endif |
| 493 | return false; |
| 494 | } |
| 495 | |
| 496 | static void tp_add_connection(CONNECT *connect) |
| 497 | { |
nothing calls this directly
no test coverage detected