Isolates and static variables

14 views
Skip to first unread message

Tony Finch

unread,
Oct 11, 2011, 11:33:37 AM10/11/11
to mi...@dartlang.org
How do Isolates cope with class static variables, or variables in an outer
scope that are used by the Isolate subclass's methods? When an isolate is
spawned, are all static variables re-initialized from scratch in the new
context?

Tony.
--
f.anthony.n.finch <d...@dotat.at> http://dotat.at/
Humber: West or northwest 5 to 7 becoming variable 3 or 4. Moderate or rough
becoming slight or moderate. Rain. Good, occasionally poor.

Ben Laurie

unread,
Oct 11, 2011, 12:09:57 PM10/11/11
to Tony Finch, mi...@dartlang.org
On 11 October 2011 16:33, Tony Finch <d...@dotat.at> wrote:
> How do Isolates cope with class static variables, or variables in an outer
> scope that are used by the Isolate subclass's methods? When an isolate is
> spawned, are all static variables re-initialized from scratch in the new
> context?

Yes.

Or, to put it another way, all statics are per-isolate.

Isolates share no state.

Reply all
Reply to author
Forward
0 new messages