| 33 | |
| 34 | |
| 35 | void AsynchronousBlockInputStream::next() |
| 36 | { |
| 37 | ready.reset(); |
| 38 | |
| 39 | pool.scheduleOrThrowOnError([this, thread_group = CurrentThread::getGroup()]() |
| 40 | { |
| 41 | CurrentMetrics::Increment metric_increment{CurrentMetrics::QueryThread}; |
| 42 | |
| 43 | try |
| 44 | { |
| 45 | if (first) |
| 46 | setThreadName("AsyncBlockInput"); |
| 47 | |
| 48 | /// AsynchronousBlockInputStream is used in Client which does not create queries and thread groups |
| 49 | if (thread_group) |
| 50 | CurrentThread::attachToIfDetached(thread_group); |
| 51 | } |
| 52 | catch (...) |
| 53 | { |
| 54 | exception = std::current_exception(); |
| 55 | ready.set(); |
| 56 | return; |
| 57 | } |
| 58 | |
| 59 | calculate(); |
| 60 | }); |
| 61 | } |
| 62 | |
| 63 | |
| 64 | void AsynchronousBlockInputStream::calculate() |
no test coverage detected