| 612 | } |
| 613 | |
| 614 | void StartTorControl(CService onion_service_target) |
| 615 | { |
| 616 | assert(!gBase); |
| 617 | #ifdef WIN32 |
| 618 | evthread_use_windows_threads(); |
| 619 | #else |
| 620 | evthread_use_pthreads(); |
| 621 | #endif |
| 622 | gBase = event_base_new(); |
| 623 | if (!gBase) { |
| 624 | LogPrintf("tor: Unable to create event_base\n"); |
| 625 | return; |
| 626 | } |
| 627 | |
| 628 | torControlThread = std::thread(&util::TraceThread, "torcontrol", [onion_service_target] { |
| 629 | TorControlThread(onion_service_target); |
| 630 | }); |
| 631 | } |
| 632 | |
| 633 | void InterruptTorControl() |
| 634 | { |
no test coverage detected