co-rs / mco

Rust Async Coroutine Runtime that combines speed and ease to use
Apache License 2.0
61 stars 6 forks source link

Coroutines or goroutines? #1

Open cameronelliott opened 1 year ago

cameronelliott commented 1 year ago

Is this package more like goroutines or coroutines?

goroutines: green-threads: cooperative-multitasking through context switching using a library or run-time. (goroutines are non-preemptive, I believe, but the runtime decides when to context switch)

coroutines: cooperative-multitasking through subroutine yield or calls.

I didn't really understand from the Readme, which describes this package as coroutines, but compares it to go Goroutines/green threads.

zhuxiujia commented 10 months ago

Is this package more like goroutines or coroutines?

goroutines: green-threads: cooperative-multitasking through context switching using a library or run-time. (goroutines are non-preemptive, I believe, but the runtime decides when to context switch)

coroutines: cooperative-multitasking through subroutine yield or calls.

I didn't really understand from the Readme, which describes this package as coroutines, but compares it to go Goroutines/green threads.

yes ,maybe most like goroutines