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

Session resource handling #18

Open
noxiouz opened this issue Feb 7, 2015 · 2 comments
Open

Session resource handling #18

noxiouz opened this issue Feb 7, 2015 · 2 comments
Assignees

Comments

@noxiouz
Copy link
Owner

noxiouz commented Feb 7, 2015

To control session C pointer we must introduce destructor method, but we shouldn't dispose session until all callbacks are invoked (Seems it would lead to segfault).
To control proper context disposing it's better to associate Pool context map with a session. So if session.map is not empty - we cann't destroy and must wait.

@bioothod what do you think about it?

@noxiouz noxiouz self-assigned this Feb 7, 2015
@bioothod
Copy link
Contributor

bioothod commented Feb 7, 2015

Destructor method already exists, blocking until internal map of contexts is empty sounds like a good idea. It should also print error into log when destructor is called and yet there are some contexts

@bioothod
Copy link
Contributor

bioothod commented Feb 8, 2015

Or even better - panic with stack trace if destructor has been called with non-empty context map

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

No branches or pull requests

2 participants