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

Add a client method to discard all object data #18

Open
rafa-be opened this issue Sep 24, 2024 · 0 comments
Open

Add a client method to discard all object data #18

rafa-be opened this issue Sep 24, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@rafa-be
Copy link
Collaborator

rafa-be commented Sep 24, 2024

Objects' lifetimes match the client's lifetime.

However, in some use case, it would be nice to be able to discard all previously objects when those are no longer needed.

fut = client.submit(function, args)
fut.result()

client.clear_objects()

fut.result()  # raises an exception, the future is no longer valid

fut = client.submit(function_2, args_2)
fut.result()

This would particularly speedup Parfun, as the library is creating more clients than required to avoid memory leaks.

@sharpener6 sharpener6 added the enhancement New feature or request label Sep 27, 2024
@rafa-be rafa-be self-assigned this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants