Comments (5)
BTW, It seems to deadloop as os.sleep calls Sleep on Windows, whose parameter type, is in fact DWORD
, an uint32, but Nim wraps it as int32, so pass negative int just becomes a large unsigned int.
Still a DWORD
relative issue...
from nim.
What's wrong with -1
meaning "forever"?
from nim.
on posix, it returns immediately. (and set errno to EINVAL
)
from nim.
What's wrong with -1 meaning "forever"?
And strictly speaking, not forever, but a very large uint amount of time.
e.g. Currently on Windows:
sleep(-1)
in fact does Sleep(4294967295)
a.k.a. while sleep(-1)
means sleep forever is somewhat reasonable, it means sleep for 49 days on Windows and sleep for no time on POSIX.
from nim.
sleep
should take Natural
.
from nim.
Related Issues (20)
- `joinPath` sometimes has extra `.` in the beginning of the path HOT 3
- `hasCustomPragma` does not work on generic types HOT 1
- Rasing an exception leaks memeory in `orc` HOT 1
- Seq IndexDefect leaks memeory in `arc` and `orc`
- https://learnxinyminutes.com/docs/nim/ error in the learning documentation code HOT 3
- `noinit` can cause arc to crash with ref objects HOT 2
- hello world Mummy web server crashes on devel HOT 2
- Sigsegv on std/tasks destructor HOT 1
- `=destroy` for non-var failed to compile when `nim doc` HOT 4
- regression from 2.0.4 to 2.0.6 cannot instantiate: 'SomeInteger' in return type HOT 1
- Deadloop in Windows, `os.sleep(-1)` HOT 1
- Inefficient codegen for field return HOT 1
- `setLen(0)` allocates memory causing performance regression HOT 3
- Generic sequence of proc type mismatch HOT 3
- `int64/int64` not compile for JS, but for C. HOT 4
- Local variables can be prematurely moved to closure, causing use-after-move HOT 2
- Regression: ambiguous identifier
- Regression from 1.6 to 2.0 using static parameter in return type with function taking typeclass HOT 2
- Can't create empty openArray with int8 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nim.