Skip to content

Conversation

@lasconic
Copy link
Collaborator

Also uses multiprocess.Pool instead of Process. It's twice faster !

@BoboTiG BoboTiG merged commit bb3894b into reader-dict:master Oct 16, 2025
1 check passed
@BoboTiG
Copy link
Member

BoboTiG commented Oct 16, 2025

I do not know yet how to deal with this regression: context.close_ctx() is never called in --render.
The context setup being done at pool init, we then loose control to call close() at the end of the pool.

Do you have an idea how to deal with it?

@lasconic
Copy link
Collaborator Author

Is it really a problem ? context.init installs a "atexit" to close the context (and the db). That should be per process.

@BoboTiG
Copy link
Member

BoboTiG commented Oct 16, 2025

It is on the multilingual side, since another locale trying to open the DB with uncomitted changes will throw an error. I'm not really sure about the root cause, but having the DB properly closed could be better to start.

@BoboTiG
Copy link
Member

BoboTiG commented Oct 16, 2025

I logged when setup_*() and close_ctx() are called: close_ctx() is simply never called.

EDIT: it varies, sometimes it's called, sometimes not. I guess this is related to when stdout is still available at interpreter exit. But I'm sill seeing the DB not closed at exit anyway.

@BoboTiG
Copy link
Member

BoboTiG commented Oct 16, 2025

Forget it, I must have broken the DB somehow. I'll retry from a fresh ground.

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.

2 participants