GoogleChromeLabs / GoogleChromeLabs/comlink

Generator functions

Open
#435 12 comments 8 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
12.8k
Forks
435
PR merge metrics
No merged PRs in 30d

Description

Hello!

I am a new user to comlink and am thrilled to begin integrating it into my projects as the primary way to communicate between the main thread and web workers. My question is, does comlink provide any way of working with generator functions?

My base example is as follows:
```javascript
//////////// worker.js ///////////////
const fibGen = function*(max: number) {
if(max > 0 ) yield 1
if(max > 1 ) yield 1
let a=1, b=1
for(let i=2; i

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.