Reimplement random_bytes to be consistent with endianness#2
Merged
ysbaddaden merged 1 commit intoysbaddaden:std-merge-secure-random-into-randomfrom Sep 4, 2017
Merged
Conversation
ysbaddaden
added a commit
that referenced
this pull request
Dec 6, 2024
Upgrades the IOCP event loop for Windows to be on par with the Polling event loops (epoll, kqueue) on UNIX. After a few low hanging fruits (enqueue multiple fibers on each call, for example) the last commit completely rewrites the `#run` method: - store events in pairing heaps; - high resolution timers (`CreateWaitableTimer`); - block forever/never (no need for timeout); - cancelling timeouts (no more dead fibers); - thread safety (parallel timer de/enqueues) for [RFC #2]; - interrupt run using completion key instead of an UserAPC for [RFC #2] (untested). [RFC #2]: crystal-lang/rfcs#2
ysbaddaden
added a commit
that referenced
this pull request
Dec 6, 2024
- Add the `ExecutionContext` module; - Add the `ExecutionContext::Scheduler` module; - Add the `execution_context` compile-time flag. When the `execution_context` flag is set: - Don't load `Crystal::Scheduler`; - Plug `ExecutionContext` instead of `Crystal::Scheduler`.
ysbaddaden
added a commit
that referenced
this pull request
Dec 9, 2024
- Add the `ExecutionContext` module; - Add the `ExecutionContext::Scheduler` module; - Add the `execution_context` compile-time flag. When the `execution_context` flag is set: - Don't load `Crystal::Scheduler`; - Plug `ExecutionContext` instead of `Crystal::Scheduler`.
ysbaddaden
added a commit
that referenced
this pull request
Dec 20, 2024
- Add the `ExecutionContext` module; - Add the `ExecutionContext::Scheduler` module; - Add the `execution_context` compile-time flag. When the `execution_context` flag is set: - Don't load `Crystal::Scheduler`; - Plug `ExecutionContext` instead of `Crystal::Scheduler`.
ysbaddaden
added a commit
that referenced
this pull request
Jan 6, 2025
- Add the `ExecutionContext` module; - Add the `ExecutionContext::Scheduler` module; - Add the `execution_context` compile-time flag. When the `execution_context` flag is set: - Don't load `Crystal::Scheduler`; - Plug `ExecutionContext` instead of `Crystal::Scheduler`.
ysbaddaden
added a commit
that referenced
this pull request
Jan 7, 2025
- Add the `ExecutionContext` module; - Add the `ExecutionContext::Scheduler` module; - Add the `execution_context` compile-time flag. When the `execution_context` flag is set: - Don't load `Crystal::Scheduler`; - Plug `ExecutionContext` instead of `Crystal::Scheduler`.
ysbaddaden
added a commit
that referenced
this pull request
Jan 16, 2025
- Add the `ExecutionContext` module; - Add the `ExecutionContext::Scheduler` module; - Add the `execution_context` compile-time flag. When the `execution_context` flag is set: - Don't load `Crystal::Scheduler`; - Plug `ExecutionContext` instead of `Crystal::Scheduler` in `spawn`, `Fiber`, ... This is only the skeleton: there are no implementations (yet). Trying to compile anything with `-Dexecution_context` will obviously fail for the time being.
ysbaddaden
pushed a commit
that referenced
this pull request
Feb 9, 2025
`Tuple#to_a(&)` is an optimized implementation of `Enumerable#to_a(&)` (overriding `Indexable#to_a(&)`).
But the array is wrongly typed. It is impossible to map to a type that's not in the tuple:
```cr
{1}.to_a(&.to_s) # Error: expected argument #2 to 'Pointer(Int32)#[]=' to be Int32, not String
```
Like the original implementations, `Tuple#to_a` must create an array that can hold the output type of the block because that's what it collects. It has nothing to do with the type of the tuple.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.