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

Close the default Context in the precompilation workload #242

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ZMQ"
uuid = "c2297ded-f4af-51ae-bb23-16f91089e4e1"
version = "1.2.5"
version = "1.2.6"

[deps]
FileWatching = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
Expand Down
7 changes: 6 additions & 1 deletion docs/src/_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ CurrentModule = ZMQ
This documents notable changes in ZMQ.jl. The format is based on [Keep a
Changelog](https://keepachangelog.com).

## Unreleased
## [v1.2.6] - 2024-06-13

### Added

- [`lib_version()`](@ref) to get the libzmq version ([#240]).

### Fixed

- Fixed a precompilation bug that would cause creating a sysimage with
PackageCompiler.jl on Julia 1.6 to fail ([#242]).

## [v1.2.5] - 2024-05-28

### Fixed
Expand Down
7 changes: 7 additions & 0 deletions src/ZMQ.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ import PrecompileTools: @compile_workload
unsafe_string(ZMQ.recv(s2))
ZMQ.close(s1)
ZMQ.close(s2)

# Using the library like this workload will initialize ZMQ._context, which
# contains a pointer. This doesn't seem to play well with serialization on
# Julia 1.6 with PackageCompiler so we explicitly close it to reset the
# pointer.
# See: https://github.com/JuliaLang/julia/issues/46214
close(ZMQ._context)
end

end