Skip to content
This repository was archived by the owner on Feb 18, 2024. It is now read-only.
This repository was archived by the owner on Feb 18, 2024. It is now read-only.

Concurrency support: detect closed file descriptors #8

@bartmeuris

Description

@bartmeuris

In order to cancel an ongoing read, I assumed is was sufficient to close the underlying file-descriptor by calling dev.File.Close() - but the ReadOne function (and I suppose the normal Read also) hangs until a new message arrives on the input device (tested with evemu).

I don't really see any other way to abort a read in progress... I've looked briefly into the code but couldn't immediately see what would be wrong, it just seems to use normal Go i/o internally?

Tested with go version go1.11.2 linux/amd64 with evemu.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions