Re: Runnables and thread-unsafe members

2015-04-15 Thread Ehsan Akhgari
Sounds good to me as well. On 2015-04-14 5:44 PM, Bobby Holley wrote: +1. On Tue, Apr 14, 2015 at 2:42 PM, Kyle Huey wrote: On Tue, Apr 14, 2015 at 2:39 PM, Randell Jesup wrote: (was: Re: Proposal to ban the usage of refcounted objects inside C++ lambdas in Gecko) tl;dr: We should make Di

Re: Runnables and thread-unsafe members

2015-04-14 Thread Jan-Ivar Bruaroey
On 4/14/15 5:39 PM, Randell Jesup wrote: I wonder if we could move to requiring already_AddRefed for DispatchToMainThread (and Dispatch?), and thus block all attempts to do DispatchToMainThread(new FooRunnable), etc. :-) Yes! +1. I like the .forget() semantics, but just to have options, here'

Re: Runnables and thread-unsafe members

2015-04-14 Thread Bobby Holley
+1. On Tue, Apr 14, 2015 at 2:42 PM, Kyle Huey wrote: > On Tue, Apr 14, 2015 at 2:39 PM, Randell Jesup > wrote: > > (was: Re: Proposal to ban the usage of refcounted objects inside C++ > > lambdas in Gecko) > > > > tl;dr: We should make DispatchToMainThread take already_AddRefed and > > move aw

Re: Runnables and thread-unsafe members

2015-04-14 Thread Kyle Huey
On Tue, Apr 14, 2015 at 2:39 PM, Randell Jesup wrote: > (was: Re: Proposal to ban the usage of refcounted objects inside C++ > lambdas in Gecko) > > tl;dr: We should make DispatchToMainThread take already_AddRefed and > move away from raw ptrs for Dispatches in general. Agreed. - Kyle __

Runnables and thread-unsafe members

2015-04-14 Thread Randell Jesup
(was: Re: Proposal to ban the usage of refcounted objects inside C++ lambdas in Gecko) tl;dr: We should make DispatchToMainThread take already_AddRefed and move away from raw ptrs for Dispatches in general. So: What I want to avoid is this pattern for runnables that hold thread-restricted pointe