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

WIP add Effect for a KV cache #17

Closed

Conversation

lukewilliamboswell
Copy link
Collaborator

No description provided.

@lukewilliamboswell
Copy link
Collaborator Author

The next step I think is to implement the store using something like

# This is a temporary implementation until effect interpreters are implemented 
fn get_global_hashmap() -> MutexGuard<'static, HashMap<String, u16>> {
    static map: OnceLock<Mutex<HashMap<String, u16>>> = OnceLock::new();
    map.get_or_init(|| Mutex::new(HashMap::new()))
        .lock()
        .expect("Let's hope the lock isn't poisoned")
}

@lukewilliamboswell
Copy link
Collaborator Author

Closing this as no longer planned.

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.

None yet

1 participant