Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Alternate dispatch infra #2939

Closed

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Sep 13, 2019

Alternative take on #2785 - instead of implementing ops as traits they are functions with defined signature that are registered during startup.

I got registration of ops working - it is done in denoMain.

For now there are two hard coded dispatchers - minimal and json. Dispatchers code definitely needs deduplication and abstraction into trait.

This is still very early prototype.

CC @afinch7 @ry

@bartlomieju bartlomieju force-pushed the feat-alternate_dispatch branch 2 times, most recently from 2b3c348 to a0b270c Compare September 13, 2019 14:32
H: Copy + 'static,
{
pub op_registry: RwLock<BTreeMap<OpId, H>>,
pub name_registry: RwLock<BTreeMap<String, OpId>>,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since op_id is effectively an offset we could try with Vec instead of BTreeMap

@bartlomieju bartlomieju force-pushed the feat-alternate_dispatch branch 2 times, most recently from d88f66e to 62c3613 Compare September 20, 2019 10:54
@bartlomieju bartlomieju force-pushed the feat-alternate_dispatch branch from 62c3613 to 840e67d Compare September 20, 2019 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant