Open
Conversation
added 30 commits
September 6, 2014 14:39
license: MIT
authors: Peter Zion
years: 2014
user: pzion
Julia Version 0.3.0 [7681878*]
Added client connection with user auth and db options
Fixed missing base overrides - I think there was a failing 0.4 test before anyway
that refers to prereleases of julia 0.3 and has not been necessary for a year
remove - on julia version in REQUIRE
fix Dict syntax in readme for 0.4, fix import warning
0.4.0 deprecations
New query syntax with operators and modifiers
When I run the "Mongo.destroy" command to close the connection manually, it is closed as expected. But end of the program, Julia will call the handler "finalizer" which will try to close the connection. When the "finalizer" is called, the connection has been closed. At this time, called "mongoc_client_destroy" will release the error "segmentation fault". To solve, I implemented the MongoClient._closed attribute and when "Mongo.destroy" is invoked, the function will check the value of the attribute. If you have "false" calls "mongoc_client_destroy" and changes the value of "_closed" to "true". When Julia called "finalizer", the "mongoc_client_destroy" will not be called again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When I run the
Mongo.destroycommand to close the connection manually,it is closed as expected. But end of the program,
Julia will call the handler
finalizerwhich will try to close the connection.When the
finalizeris called, the connection has been closed. At this time,called
mongoc_client_destroywill release the error "segmentation fault".To solve, I implemented the
MongoClient._closedattribute and whenMongo.destroyis invoked, the function will check the value of the attribute. If you have
falsecalls
mongoc_client_destroyand changes the value of_closedtotrue.When Julia called
finalizer, themongoc_client_destroywill not be called again.