[CDRIVER-1981] Threads are not closed correctly on windows Created: 05/Jan/17  Updated: 03/May/17  Resolved: 27/Mar/17

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.7.0

Type: Bug Priority: Minor - P4
Reporter: Alex Assignee: Backlog - C Driver Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows



 Description   

Here in code CreateThread func used but there is no CloseHandle call so it leaks the handle



 Comments   
Comment by Githook User [ 28/Mar/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1981 cleanup threads on Windows
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/c8e766ecddaccda0ec018af60171f5b58c6f05a8

Comment by A. Jesse Jiryu Davis [ 05/Jan/17 ]

Thanks for the report! This will only be an issue when destroying mongoc_client_pool_t structs, which you should have one of for the duration of your application process. Nevertheless we will fix this soon.

Comment by Alex [ 05/Jan/17 ]

Check MSDN doc: "The thread object remains in the system until the thread has terminated and all handles to it have been closed through a call to CloseHandle."

Generated at Wed Feb 07 21:13:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.