Re: Workers

James Graham wrote:
> 
> Andrew Fedoniouk wrote:
> 
>> I think that term 'thread' shall be used in the specification instead of
>> "completely separate and parallel execution environment". Thread is 
>> well established and universally understood term. Anyway that 
>> specification is targeted on developers. I doubt that any 
>> non-technical person will even try to read that.
> 
> I was under the impression that the term "thread" generally implied 
> shared state whereas workers are shared nothing. Unless I am mistaken I 
> think that referring to workers as "threads" would be bad because it 
> will give people the idea that the workers api needs to solve all the 
> problems that come with shared state.
> 

Technically there are shared states/objects. E.g. multiple Worker 
threads share the same communication pipe that is accessible through 
MessagePort endpoints. Collection of databases / storages is also 
shareable with the owner in terms that set of available DB/Storages for 
the Worker is the same as for the owner that created it.

Another example is state of http client: it has limited set of 
simultaneous connections available. Thus http client is a common 
resource/state for all Workers.

-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Sunday, 20 July 2008 23:31:48 UTC