Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

cpu: Add Realtime() function #185

Closed
maruel opened this issue Dec 12, 2017 · 1 comment
Closed

cpu: Add Realtime() function #185

maruel opened this issue Dec 12, 2017 · 1 comment

Comments

@maruel
Copy link
Contributor

maruel commented Dec 12, 2017

This function would:

In practice, the only way to unlock the goroutine would be to exit. This would safeguard against various potential issues and would force users to have correctly designed concurrency. A protection should also be applied to disallow its use on single-core system.

As a fallback, it could increase the whole process priority, e.g. syscall.SetPriority(syscall.PRIO_PROCESS, 0, -20) with an actual reasonable value to be determined.

Note: I'm still ambivalent about the above, if it belongs in the library at all but it is relevant enough for the use cases to make sense.

@maruel
Copy link
Contributor Author

maruel commented Sep 20, 2023

Ported to periph/host#48.

@maruel maruel closed this as completed Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant