Skip to content

Conversation

@dpc
Copy link
Owner

@dpc dpc commented Jun 3, 2025

No description provided.

@dpc dpc force-pushed the dpc/jj-qqxqqrnmzztz branch 5 times, most recently from 19093f1 to e6bf087 Compare June 3, 2025 20:30
@dpc dpc force-pushed the dpc/jj-qqxqqrnmzztz branch from e6bf087 to ceb8c29 Compare June 3, 2025 20:31
@dpc dpc merged commit 906f555 into master Jun 5, 2025
3 of 5 checks passed
use std::io::Read as _;

// ignore, we *will* disconnect, nothing interesting about it
let _ = s.read(&mut [0]);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dpc maybe calling read was reason it was hanging on macos?

just drop(s) feels like the better implementation to me 🤷

Copy link
Owner Author

@dpc dpc Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is supposed to hang. We're waiting for whoever is holding the lock to disconnect.

It was hanging on Darwin, because on Darwin when the process creating/binding Unix Socket is gone, the socket remains (unlike on Linux), and attempts to connect to it do not disconnect but just wait forever until something new binds on it.

@maan2003

Copy link

@maan2003 maan2003 Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so clear_lock() is for waiting for lock?

@dpc

Copy link
Owner Author

@dpc dpc Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It waits for the lock to clear? Or it waits to clear the lock? Or it waits for me to get better at naming stuff? :D

@maan2003

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants