1
0
mirror of https://github.com/Zygo/bees.git synced 2025-06-17 01:56:16 +02:00

Task: convert print_fn to a string

Since we are now unconditionally rendering the print_fn as a static
string, there is no need for it to be a function.  We also need it to
be brief and mostly constant.

Use a string instead.  Put the string before the function in the Task
constructor arguments so that the title string appears as a heading in
code, since we are making a breaking API change already.

Drop TASK_MACRO as it is broken by this change, but there is no similar
usage of Task anywhere to make it worth fixing.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell
2018-01-25 21:12:31 -05:00
parent 0710208354
commit f64fc78e36
5 changed files with 75 additions and 86 deletions

View File

@ -151,9 +151,7 @@ BeesNote::get_name()
// about it being destroyed under us.
auto current_task = Task::current_task();
if (current_task) {
ostringstream oss;
oss << current_task;
return oss.str();
return current_task.title();
}
// OK try the pthread name next.