Skip to content

Comments

Add a do-block form of the CachingPool#27683

Closed
oxinabox wants to merge 2 commits intoJuliaLang:masterfrom
oxinabox:patch-8
Closed

Add a do-block form of the CachingPool#27683
oxinabox wants to merge 2 commits intoJuliaLang:masterfrom
oxinabox:patch-8

Conversation

@oxinabox
Copy link
Contributor

This feels right.

Generally I think there is some region of code in which the cached functions need to be keep.
So a do-block form that runs the function,
then when done clear!s the pool seems right.

I guess maybe not required as the finalizer will clean up once the pool get garbage collected.
But given that the reason you are using a CachingPool in the first place is because you are worried that you have huge closures being passed around,
clearing sooner is better than latter.

This needs tests I guess, but I figured I'ld wait and see if the idea was sound

@oxinabox
Copy link
Contributor Author

oxinabox commented Jun 24, 2018

A.V has 64 bit failure with

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x680b3d78 -- gc_mark_loop at /cygdrive/c/projects/julia/src\gc.c:1858
in expression starting at C:\projects\julia\usr\share\julia\stdlib\v0.7\Pkg\src\precompile.jl:75
gc_get_stack_addr at /cygdrive/c/projects/julia/src\gc.c:1351 [inlined]
gc_read_stack at /cygdrive/c/projects/julia/src\gc.c:1358 [inlined]

during precompilation.

CircleCI failed during make for reasons that I can't see displayed

@martinholters
Copy link
Member

The AV failure is probably because it was run prior to #27702, the "Killed" on Circle is usually OOM, IIUC.

@DilumAluthge
Copy link
Member

@oxinabox Is this still something you want?

@oxinabox
Copy link
Contributor Author

oxinabox commented Sep 30, 2025

yes, this is still wanted. I should rebase this.
It's less pressing now that Caching is the default

@DilumAluthge
Copy link
Member

Bump @oxinabox - Can you rebase this on the latest Julia master, and fix the merge conflicts?

oxinabox added a commit to oxinabox/Distributed.jl that referenced this pull request Feb 4, 2026
This is just making JuliaLang/julia#27683
again.
Since the code moved to a new repo
@oxinabox
Copy link
Contributor Author

oxinabox commented Feb 4, 2026

Replaced with JuliaLang/Distributed.jl#163

@oxinabox oxinabox closed this Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants