Blender V5.3
session/session.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#include <cstring>
6
7#include "device/cpu/device.h"
8#include "device/device.h"
10#include "scene/background.h"
11#include "scene/camera.h"
12#include "scene/image.h"
13#include "scene/integrator.h"
14#include "scene/light.h"
15#include "scene/mesh.h"
16#include "scene/object.h"
17#include "scene/scene.h"
18#include "scene/shader_graph.h"
19#include "session/buffers.h"
22#include "session/session.h"
23
24#include "util/log.h"
25#include "util/math.h"
26#include "util/task.h"
27#include "util/time.h"
28
30
31Session::Session(const SessionParams &params_, const SceneParams &scene_params)
32 : params(params_),
33 eviction_manager_(params_.background),
35{
37
39
40 pause_ = false;
41 new_work_added_ = false;
42
44
45 if (device->have_error()) {
46 progress.set_error(device->error_message());
47 }
48
49 scene = make_unique<Scene>(scene_params, device.get());
50
52 /* Reuse render device. */
53 }
54 else {
56
57 if (denoise_device_->have_error()) {
58 progress.set_error(denoise_device_->error_message());
59 }
60 }
61
62 /* Configure path tracer. */
63 path_trace_ = make_unique<PathTrace>(device.get(),
65 scene->film,
66 &scene->dscene,
69 path_trace_->set_progress(&progress);
70 path_trace_->progress_update_cb = [&]() { update_status_time(); };
71
72 tile_manager_.full_buffer_written_cb = [&](string_view filename) {
74 return;
75 }
76 full_buffer_written_cb(filename);
77 };
78
79 /* Create session thread. */
80 session_thread_ = make_unique<thread>([this] { thread_run(); });
81}
82
84{
85 /* Cancel any ongoing render operation. */
86 cancel();
87
88 /* Signal session thread to end. */
89 {
90 const thread_scoped_lock session_thread_lock(session_thread_mutex_);
92 }
93 session_thread_cond_.notify_all();
94
95 /* Destroy session thread. */
96 session_thread_->join();
97 session_thread_.reset();
98
99 /* Destroy path tracer, before the device. This is needed because destruction might need to
100 * access device for device memory free.
101 * TODO(sergey): Convert device to be unique_ptr, and rely on C++ to destruct objects in the
102 * pre-defined order. */
103 path_trace_.reset();
104
105 /* Destroy scene and device. */
106 scene.reset();
107 denoise_device_.reset();
108 device.reset();
109
110 /* Stop task scheduler. */
112}
113
115{
116 {
117 /* Signal session thread to start rendering. */
118 const thread_scoped_lock session_thread_lock(session_thread_mutex_);
120 /* Already rendering, nothing to do. */
121 return;
122 }
124 }
125
126 session_thread_cond_.notify_all();
127}
128
129void Session::cancel(bool quick)
130{
131 /* Cancel any long running device operations (e.g. shader compilations). */
132 device->cancel();
133
134 /* Check if session thread is rendering. */
135 const bool rendering = is_session_thread_rendering();
136
137 if (rendering) {
138 /* Cancel path trace operations. */
139 if (quick && path_trace_) {
140 path_trace_->cancel();
141 }
142
143 /* Cancel other operations. */
144 progress.set_cancel("Exiting");
145
146 /* Signal unpause in case the render was paused. */
147 {
148 const thread_scoped_lock pause_lock(pause_mutex_);
149 pause_ = false;
150 }
151 pause_cond_.notify_all();
152
153 /* Wait for render thread to be cancelled or finished. */
154 wait();
155 }
156}
157
159{
160 return path_trace_->ready_to_reset();
161}
162
164{
165 path_trace_->zero_display();
166
167 while (true) {
169
170 const bool did_cancel = progress.get_cancel();
171
172 if (!render_work) {
174 if (did_cancel) {
175 LOG_INFO << "Rendering was canceled.";
176 }
177 else {
178 double total_time;
179 double render_time;
180 progress.get_time(total_time, render_time);
181 LOG_INFO << "Rendering in main loop is done in " << render_time << " seconds.";
182 LOG_INFO << path_trace_->full_report();
183 }
184 }
185
186 if (params.background) {
187 /* if no work left and in background mode, we can stop immediately. */
188 progress.set_status("Finished");
189 break;
190 }
191 }
192
193 if (did_cancel) {
195 if (!render_work) {
196 break;
197 }
198 }
199 else if (run_wait_for_work(render_work)) {
200 continue;
201 }
202
203 /* Stop rendering if error happened during scene update or other step of preparing scene
204 * for render. */
205 if (device->have_error()) {
206 progress.set_error(device->error_message());
207 break;
208 }
209
210 {
211 /* buffers mutex is locked entirely while rendering each
212 * sample, and released/reacquired on each iteration to allow
213 * reset and draw in between */
214 const thread_scoped_lock buffers_lock(buffers_mutex_);
215
216 /* update status and timing */
218
219 /* render */
220 path_trace_->render(render_work);
221
222 /* update status and timing */
224
225 /* Stop rendering if error happened during path tracing. */
226 if (device->have_error()) {
227 progress.set_error(device->error_message());
228 break;
229 }
230 }
231
233
234 if (did_cancel) {
235 break;
236 }
237 }
238}
239
241{
242 while (true) {
243 {
244 thread_scoped_lock session_thread_lock(session_thread_mutex_);
245
247 /* Continue waiting for any signal from the main thread. */
248 session_thread_cond_.wait(session_thread_lock);
249 continue;
250 }
252 /* End thread immediately. */
253 break;
254 }
255 }
256
257 /* Execute a render. */
259
260 /* Go back from rendering to waiting. */
261 {
262 const thread_scoped_lock session_thread_lock(session_thread_mutex_);
265 }
266 }
267 session_thread_cond_.notify_all();
268 }
269
270 /* Flush any remaining operations and destroy display driver here. This ensure
271 * graphics API resources are created and destroyed all in the session thread,
272 * which can avoid problems contexts and multiple threads. */
273 path_trace_->flush_display();
274 path_trace_->set_display_driver(nullptr);
275}
276
278{
280 profiler.start();
281 }
282
283 /* session thread loop */
284 progress.set_status("Waiting for render to start");
285
286 /* run */
287 if (!progress.get_cancel()) {
288 /* reset number of rendered samples */
290
292 }
293
294 profiler.stop();
295
296 /* progress update */
297 if (progress.get_cancel()) {
299 }
300 else {
302 }
303}
304
310
312{
313 RenderWork render_work;
314
315 thread_scoped_lock scene_lock(scene->mutex);
316
317 /* Perform delayed reset if requested. */
318 const bool reset_buffers = delayed_reset_buffer_params();
319
320 /* Update scene */
321 const bool reset_scene = update_scene(delayed_reset_.do_reset);
322
323 /* Update buffers for new parameters. After scene update which influences the passes used. */
324 bool have_tiles = true;
325 bool switched_to_new_tile = false;
326
327 if (reset_buffers) {
329
330 /* After reset make sure the tile manager is at the first big tile. */
331 have_tiles = tile_manager_.next();
332 switched_to_new_tile = true;
333
335 }
336
337 /* Update denoiser settings. */
338 {
339 const DenoiseParams denoise_params = scene->integrator->get_denoise_params();
340 path_trace_->set_denoiser_params(denoise_params);
341 }
342
343 /* Update adaptive sampling. */
344 {
345 const AdaptiveSampling adaptive_sampling = scene->integrator->get_adaptive_sampling();
346 path_trace_->set_adaptive_sampling(adaptive_sampling);
347 }
348
349 /* Update path guiding. */
350 {
351 const GuidingParams guiding_params = scene->integrator->get_guiding_params(device.get());
352 const bool guiding_reset = (guiding_params.use) ? reset_scene : false;
353 path_trace_->set_guiding_params(guiding_params, guiding_reset);
354 }
355
361
362 while (have_tiles) {
363 render_work = render_scheduler_.get_render_work();
364 if (render_work) {
365 break;
366 }
367
369
370 have_tiles = tile_manager_.next();
371 if (have_tiles) {
373 switched_to_new_tile = true;
374 }
375 }
376
377 /* Evict unused image tiles periodically. */
378 if (eviction_manager_.need_eviction(!render_work, switched_to_new_tile)) {
379 scene->image_manager->evict_unused(device.get(), scene.get());
380 }
381
382 if (render_work) {
383 const scoped_timer update_timer;
384
385 if (switched_to_new_tile) {
386 BufferParams tile_params = buffer_params_;
387
389
390 tile_params.width = tile.width;
391 tile_params.height = tile.height;
392
393 tile_params.window_x = tile.window_x;
394 tile_params.window_y = tile.window_y;
395 tile_params.window_width = tile.window_width;
396 tile_params.window_height = tile.window_height;
397
398 tile_params.full_x = tile.x + buffer_params_.full_x;
399 tile_params.full_y = tile.y + buffer_params_.full_y;
402
403 tile_params.update_offset_stride();
404
405 path_trace_->reset(buffer_params_, tile_params, reset_buffers);
406 }
407
408 /* Update camera if dimensions changed for progressive render. the camera
409 * knows nothing about progressive or cropped rendering, it just gets the
410 * image dimensions passed in. */
411 const float resolution = render_work.resolution_divider;
412 const int width = max(1, int(buffer_params_.full_width / resolution));
413 const int height = max(1, int(buffer_params_.full_height / resolution));
414
415 scene->update_camera_resolution(progress, width, height);
416
417 /* Unlock scene mutex before loading denoiser kernels, since that may attempt to activate
418 * graphics interop, which can deadlock when the scene mutex is still being held. */
419 scene_lock.unlock();
420
421 path_trace_->load_kernels();
422 path_trace_->alloc_work_memory();
423
424 /* Wait for device to be ready (e.g. finish any background compilations). */
425 string device_status;
426 while (!device->is_ready(device_status)) {
427 progress.set_status(device_status);
428 if (progress.get_cancel()) {
429 break;
430 }
431 std::this_thread::sleep_for(std::chrono::milliseconds(200));
432 }
433
435 }
436
437 return render_work;
438}
439
441{
442 /* In an offline rendering there is no pause, and no tiles will mean the job is fully done. */
443 if (params.background) {
444 return false;
445 }
446
448
449 if (!pause_ && render_work) {
450 /* Rendering is not paused and there is work to be done. No need to wait for anything. */
451 return false;
452 }
453
454 const bool no_work = !render_work;
455 update_status_time(pause_, no_work);
456
457 /* Only leave the loop when rendering is not paused. But even if the current render is
458 * un-paused but there is nothing to render keep waiting until new work is added. */
459 while (!progress.get_cancel()) {
460 const scoped_timer pause_timer;
461
462 if (!pause_ && (render_work || new_work_added_ || delayed_reset_.do_reset)) {
463 break;
464 }
465
466 const std::chrono::milliseconds wait_time = eviction_manager_.wait_time(!render_work);
467 if (wait_time == std::chrono::milliseconds::zero()) {
468 /* Break out of the loop for cache eviction. */
469 break;
470 }
471
472 /* Wait for either pause state changed, extra samples added to render, or idle
473 * timer before performing eviction. */
474 if (wait_time == std::chrono::milliseconds::max()) {
475 pause_cond_.wait(pause_lock);
476 }
477 else {
478 pause_cond_.wait_for(pause_lock, wait_time);
479 }
480
481 if (pause_) {
483 }
484
485 update_status_time(pause_, no_work);
487 }
488
489 new_work_added_ = false;
490
491 return no_work;
492}
493
495{
496 path_trace_->draw();
497}
498
500{
501 const int image_width = buffer_params_.width;
502 const int image_height = buffer_params_.height;
503
504 if (!params.use_auto_tile) {
505 return make_int2(image_width, image_height);
506 }
507
508 const int64_t image_area = static_cast<int64_t>(image_width) * image_height;
509
510 /* TODO(sergey): Take available memory into account, and if there is enough memory do not
511 * tile and prefer optimal performance. */
512
514 const int64_t actual_tile_area = static_cast<int64_t>(tile_size) * tile_size;
515
516 if (actual_tile_area >= image_area && image_width <= TileManager::MAX_TILE_SIZE &&
517 image_height <= TileManager::MAX_TILE_SIZE)
518 {
519 return make_int2(image_width, image_height);
520 }
521
522 return make_int2(tile_size, tile_size);
523}
524
526{
527 /* Reset buffer parameters, delayed from when we got the reset call so we can complete
528 * rendering the sample. Otherwise e.g. viewport navigation might reset without ever
529 * finishing anything. */
530 const thread_scoped_lock reset_lock(delayed_reset_.mutex);
532 return false;
533 }
534
535 const thread_scoped_lock buffers_lock(buffers_mutex_);
536 delayed_reset_.do_reset = false;
537
540
541 /* Store parameters used for buffers access outside of scene graph. */
543 buffer_params_.exposure = scene->film->get_exposure();
545 scene->film->get_use_approximate_shadow_catcher();
546 buffer_params_.use_transparent_background = scene->background->get_transparent();
547
548 /* Tile and work scheduling. */
550
551 return true;
552}
553
555{
561
562 /* Update for new state of scene and passes. */
565
566 /* Update temp directory on reset.
567 * This potentially allows to finish the existing rendering with a previously configure
568 * temporary
569 * directory in the host software and switch to a new temp directory when new render starts. */
571
572 /* Progress. */
576
577 if (!params.background) {
579 }
580 const double time_limit = params.time_limit * ((double)tile_manager_.get_num_tiles());
582 progress.set_time_limit(time_limit);
583}
584
585void Session::reset(const SessionParams &session_params, const BufferParams &buffer_params)
586{
587 {
588 const thread_scoped_lock reset_lock(delayed_reset_.mutex);
589 const thread_scoped_lock pause_lock(pause_mutex_);
590
592 delayed_reset_.session_params = session_params;
593 delayed_reset_.buffer_params = buffer_params;
594
595 scene->scene_updated_while_loading_kernels = true;
596
597 path_trace_->cancel();
598 }
599
600 pause_cond_.notify_all();
601}
602
603void Session::set_samples(const int samples)
604{
605 if (samples == params.samples) {
606 return;
607 }
608
609 params.samples = samples;
610
611 {
612 const thread_scoped_lock pause_lock(pause_mutex_);
613 new_work_added_ = true;
614 }
615
616 pause_cond_.notify_all();
617}
618
619void Session::set_time_limit(const double time_limit)
620{
621 if (time_limit == params.time_limit) {
622 return;
623 }
624
625 params.time_limit = time_limit;
626
627 {
628 const thread_scoped_lock pause_lock(pause_mutex_);
629 new_work_added_ = true;
630 }
631
632 pause_cond_.notify_all();
633}
634
635void Session::set_pause(bool pause)
636{
637 bool notify = false;
638
639 {
640 const thread_scoped_lock pause_lock(pause_mutex_);
641
642 if (pause != pause_) {
643 pause_ = pause;
644 notify = true;
645 }
646 }
647
649 if (notify) {
650 pause_cond_.notify_all();
651 }
652 }
653 else if (pause_) {
655 }
656}
657
658void Session::set_navigating(bool navigating)
659{
661}
662
664{
665 path_trace_->set_output_driver(std::move(driver));
666}
667
669{
670 path_trace_->set_display_driver(std::move(driver));
671}
672
674{
675 const double completed = progress.get_progress();
676 if (completed == 0.0) {
677 return 0.0;
678 }
679
680 double total_time;
681 double render_time;
682 progress.get_time(total_time, render_time);
683 double remaining = (1.0 - (double)completed) * (render_time / (double)completed);
684
685 const double time_limit = render_scheduler_.get_time_limit() *
686 ((double)tile_manager_.get_num_tiles());
687 if (time_limit != 0.0) {
688 remaining = min(remaining, max(time_limit - render_time, 0.0));
689 }
690
691 return remaining;
692}
693
695{
696 /* Wait until session thread either is waiting or ending. */
697 while (true) {
698 thread_scoped_lock session_thread_lock(session_thread_mutex_);
700 break;
701 }
702 session_thread_cond_.wait(session_thread_lock);
703 }
704}
705
706bool Session::update_scene(const bool reset_samples)
707{
708 /* Update number of samples in the integrator.
709 * Ideally this would need to happen once in `Session::set_samples()`, but the issue there is
710 * the initial configuration when Session is created where the `set_samples()` is not used.
711 *
712 * NOTE: Unless reset was requested only allow increasing number of samples. */
713 if (reset_samples || scene->integrator->get_aa_samples() < params.samples) {
714 scene->integrator->set_aa_samples(params.samples);
715 }
716
717 scene->integrator->set_use_sample_subset(params.use_sample_subset);
718 scene->integrator->set_sample_subset_offset(params.sample_subset_offset);
719 scene->integrator->set_sample_subset_length(params.sample_subset_length);
720
721 /* When multiple tiles are used SAMPLE_COUNT pass is used to keep track of possible partial
722 * tile results. */
723 scene->film->set_use_sample_count(tile_manager_.has_multiple_tiles());
724
725 const bool reset = scene->need_reset(false);
726
727 if (scene->update(progress)) {
728 profiler.reset(scene->shaders.size(), scene->objects.size());
729 }
730
731 return reset;
732}
733
734static string status_append(const string &status, const string &suffix)
735{
736 string prefix = status;
737 if (!prefix.empty()) {
738 prefix += ", ";
739 }
740 return prefix + suffix;
741}
742
743void Session::update_status_time(bool show_pause, bool show_done)
744{
745 string status;
746 string substatus;
747
748 const int current_tile = progress.get_rendered_tiles();
750
751 const int current_sample = progress.get_current_sample();
752 const int num_samples = render_scheduler_.get_num_samples();
753
754 /* TIle. */
756 substatus = status_append(substatus,
757 string_printf("Rendered %d/%d Tiles", current_tile, num_tiles));
758 }
759
760 /* Sample. */
761 if (!params.background && num_samples == Integrator::MAX_SAMPLES) {
762 substatus = status_append(substatus, string_printf("Sample %d", current_sample));
763 }
764 else {
765 substatus = status_append(substatus,
766 string_printf("Sample %d/%d", current_sample, num_samples));
767 }
768
769 /* Append any device-specific status (such as background kernel optimization) */
770 string device_status;
771 if (device->is_ready(device_status) && !device_status.empty()) {
772 substatus += string_printf(" (%s)", device_status.c_str());
773 }
774
775 /* TODO(sergey): Denoising status from the path trace. */
776
777 if (show_pause) {
778 status = "Rendering Paused";
779 }
780 else if (show_done) {
781 status = "Rendering Done";
782 progress.set_end_time(); /* Save end time so that further calls to get_time are accurate. */
783 }
784 else {
785 status = substatus;
786 substatus.clear();
787 }
788
789 progress.set_status(status, substatus);
790}
791
793{
794 scene->device_free();
795 path_trace_->device_free();
796}
797
799{
800 scene->collect_statistics(render_stats);
802 render_stats->collect_profiling(scene.get(), profiler);
803 }
804}
805
806/* --------------------------------------------------------------------
807 * Full-frame on-disk storage.
808 */
809
811{
812 path_trace_->process_full_buffer_from_disk(filename);
813}
814
long long int int64_t
unsigned long long int uint64_t
btScalar max
int full_width
Definition buffers.h:85
bool use_approximate_shadow_catcher
Definition buffers.h:100
float exposure
Definition buffers.h:99
int window_y
Definition buffers.h:78
void update_offset_stride()
Definition buffers.cpp:218
int full_height
Definition buffers.h:86
int window_height
Definition buffers.h:80
int window_width
Definition buffers.h:79
NODE_DECLARE int width
Definition buffers.h:70
int window_x
Definition buffers.h:77
bool use_transparent_background
Definition buffers.h:101
int samples
Definition buffers.h:98
void update_passes()
Definition buffers.cpp:117
void set_navigating(bool navigating)
std::chrono::milliseconds wait_time(bool idle) const
bool need_eviction(bool idle, bool switched_to_new_tile)
DeviceType type
static unique_ptr< Device > create(const DeviceInfo &info, Stats &stats, Profiler &profiler, bool headless)
static const int MAX_SAMPLES
Definition integrator.h:99
void start()
Definition profiling.cpp:77
void reset(const int num_shaders, const int num_objects)
Definition profiling.cpp:57
void stop()
Definition profiling.cpp:84
int get_current_sample() const
Definition progress.h:226
void set_cancel(const string &cancel_message_)
Definition progress.h:70
void set_end_time()
Definition progress.h:163
string get_cancel_message() const
Definition progress.h:86
void set_total_pixel_samples(const uint64_t total_pixel_samples_)
Definition progress.h:178
void get_time(double &total_time_, double &render_time_) const
Definition progress.h:153
bool get_cancel() const
Definition progress.h:77
void reset_sample()
Definition progress.h:168
void set_status(const string &status_, const string &substatus_="")
Definition progress.h:248
void set_update()
Definition progress.h:306
void set_error(const string &error_message_)
Definition progress.h:98
double get_progress() const
Definition progress.h:185
void set_render_start_time()
Definition progress.h:129
void add_finished_tile(bool denoised)
Definition progress.h:214
void add_skip_time(const scoped_timer &start_timer, bool only_render)
Definition progress.h:143
int get_rendered_tiles() const
Definition progress.h:234
void set_time_limit(const double time_limit_)
Definition progress.h:136
void set_start_time()
Definition progress.h:121
void set_time_limit(const double time_limit)
double get_time_limit() const
int get_num_samples() const
void set_sample_params(const int num_samples, const bool use_sample_subset, const int sample_subset_offset, const int sample_subset_length)
void reset(const BufferParams &buffer_params)
void render_work_reschedule_on_cancel(RenderWork &render_work)
RenderWork get_render_work()
void collect_profiling(Scene *scene, Profiler &prof)
Definition stats.cpp:339
float resolution_divider
DeviceInfo denoise_device
DeviceInfo device
void thread_run()
unique_ptr< Scene > scene
void collect_statistics(RenderStats *stats)
RenderScheduler render_scheduler_
unique_ptr< thread > session_thread_
void update_status_time(bool show_pause=false, bool show_done=false)
void set_pause(bool pause)
thread_mutex pause_mutex_
Device * denoise_device()
int2 get_effective_tile_size() const
void process_full_buffer_from_disk(string_view filename)
void set_display_driver(unique_ptr< DisplayDriver > driver)
bool ready_to_reset()
std::function< void(string_view)> full_buffer_written_cb
void cancel(bool quick=false)
thread_condition_variable pause_cond_
bool update_scene(const bool reset_samples)
Progress progress
void set_navigating(bool navigating)
enum Session::@056371222103363167122077335031026143326111101235 session_thread_state_
Profiler profiler
bool run_wait_for_work(const RenderWork &render_work)
double get_estimated_remaining_time() const
SessionParams params
thread_condition_variable session_thread_cond_
Session(const SessionParams &params, const SceneParams &scene_params)
void update_buffers_for_params()
CacheEvictionManager eviction_manager_
void run_main_render_loop()
void thread_render()
thread_mutex session_thread_mutex_
BufferParams buffer_params_
unique_ptr< Device > denoise_device_
RenderWork run_update_for_next_iteration()
void set_time_limit(const double time_limit)
void reset(const SessionParams &session_params, const BufferParams &buffer_params)
bool is_session_thread_rendering()
void set_samples(const int samples)
void device_free()
unique_ptr< Device > device
thread_mutex buffers_mutex_
@ SESSION_THREAD_RENDER
void set_output_driver(unique_ptr< OutputDriver > driver)
struct Session::DelayedReset delayed_reset_
bool delayed_reset_buffer_params()
unique_ptr< PathTrace > path_trace_
TileManager tile_manager_
bool new_work_added_
static void exit()
Definition task.cpp:81
static void init(const int num_threads=0)
Definition task.cpp:60
void set_temp_dir(const string &temp_dir)
int compute_render_tile_size(const int suggested_tile_size) const
bool has_multiple_tiles() const
void update(const BufferParams &params, const Scene *scene)
const Tile & get_current_tile() const
int get_num_tiles() const
std::function< void(string_view)> full_buffer_written_cb
static const int MAX_TILE_SIZE
void reset_scheduling(const BufferParams &params, const int2 tile_size)
#define CCL_NAMESPACE_END
@ DEVICE_CPU
ccl_device_forceinline int2 make_int2(const int x, const int y)
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int num_tiles
const ccl_global KernelWorkTile * tile
#define LOG_IS_ON(level)
Definition log.h:113
@ LOG_LEVEL_INFO
Definition log.h:25
#define LOG_INFO
Definition log.h:106
static string status_append(const string &status, const string &suffix)
#define min(a, b)
Definition sort.cc:38
CCL_NAMESPACE_BEGIN string string_printf(const char *format,...)
Definition string.cpp:25
SessionParams session_params
std::unique_lock< std::mutex > thread_scoped_lock
Definition thread.h:28