printf("[thread %s] Start task\n", get_pid().c_str());
printf("[thread %s] Source emits, value = %ld\n", get_pid().c_str(), v);
return v;
});
printf("[thread %s] Trigger emits, value = %ld\n", get_pid().c_str(), v);
return v;
});
values.
[](long v){printf("[thread %s] OnNext: %ld\n", get_pid().c_str(), v);},
[](){printf("[thread %s] OnCompleted\n", get_pid().c_str());});
printf("[thread %s] Finish task\n", get_pid().c_str());
[thread 47481267428736] Start task
[thread 47481267428736] Source emits, value = 1
[thread 47481267428736] Source emits, value = 2
[thread 47481267428736] Source emits, value = 3
[thread 47481267428736] Trigger emits, value = 1
[thread 47481267428736] Source emits, value = 4
[thread 47481311586048] OnNext: 4
[thread 47481267428736] Source emits, value = 5
[thread 47481311586048] OnNext: 5
[thread 47481267428736] Source emits, value = 6
[thread 47481311586048] OnNext: 6
[thread 47481267428736] Source emits, value = 7
[thread 47481311586048] OnNext: 7
[thread 47481311586048] OnCompleted
[thread 47481267428736] Finish task