On Fri, Apr 10, 2015 at 5:25 PM, Alexandros Frantzis
<email address hidden> wrote:
>> Another option would be to abort instead of detaching the thread;
>> that's
>> implemented here:
>> https://code.launchpad.net/~raof/mir/remove-eventloop-self-
>> immolation/+merge/255767
>
> I was under the impression that self-destruction was a feature we
> needed to support (hence the test). If we don't need it, I am fine
> with dropping it/making it an error like you suggest.
It was the simplest solution for a problem I needed solving; as it's
causing problems I could probably do something different instead...
>
>> Rather than passing in a reference to a promise, would it make more
>> sense to
>> have a method
>> std::shared_future<void> shutdown_notifier()
>> and have ~SimpleDispatchThread set_value_at_thread_exit() in the
>> case of
>> destruction-from-eventloop-thread?
>
> Unfortunately g++ 4.9 doesn't support set_*_at_thread_exit.
Sadface. I really liked the idea of shutdown_notifier().
It'd actually be pretty trivial to implement
set_value_at_(close_enough_to_)thread_exit().
On Fri, Apr 10, 2015 at 5:25 PM, Alexandros Frantzis /code.launchpad .net/~raof/ mir/remove- eventloop- self- +merge/ 255767
<email address hidden> wrote:
>> Another option would be to abort instead of detaching the thread;
>> that's
>> implemented here:
>> https:/
>> immolation/
>
> I was under the impression that self-destruction was a feature we
> needed to support (hence the test). If we don't need it, I am fine
> with dropping it/making it an error like you suggest.
It was the simplest solution for a problem I needed solving; as it's
causing problems I could probably do something different instead...
> future< void> shutdown_notifier() Thread set_value_ at_thread_ exit() in the from-eventloop- thread? thread_ exit.
>> Rather than passing in a reference to a promise, would it make more
>> sense to
>> have a method
>> std::shared_
>> and have ~SimpleDispatch
>> case of
>> destruction-
>
> Unfortunately g++ 4.9 doesn't support set_*_at_
Sadface. I really liked the idea of shutdown_ notifier( ).
It'd actually be pretty trivial to implement at_(close_ enough_ to_)thread_ exit().
set_value_