Subject: Re: [boost] Any interest in a M:N green threading library?
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2015-08-12 19:47:08
On 13/08/2015 04:58, Chen Xu wrote:
> boost.green_thread uses M:N scheduling, it schedules a group of green
> threads across multiple native threads.
> boost.green_thread uses ASIO io_service for scheduling, seamlessly
> cooperate with ASIO.
> Load is balanced across all native threads in a scheduler, server
> side programs can utilize multi CPU cores more efficiently.
> Multiple native worker threads need synchronization to schedule
> green threads
> Scheduling is more complex than boost-fiber, makes a scheduler with
> only one worker thread runs slightly slower than boost-fiber.
> Cannot use native TLS as green threads may migrate between native
Can you explain how this is different from giving a single Boost.Asio
io_service multiple worker threads, and just queuing work/operations to
the io_service (possibly via strands)?
The description above makes it sound like a "green thread" is identical
to a strand.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk