7> benchmark:run(100, 1*1000*1000).
{1190.6,100000000}
🤷♂️
This file contains 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
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 9 | |
sudo update-alternatives --install /usr/bin/clang-cl clang-cl /usr/bin/clang-cl-9 9 | |
sudo update-alternatives --install /usr/bin/clang-import-test clang-import-test /usr/bin/clang-import-test-9 9 | |
sudo update-alternatives --install /usr/bin/clang-rename clang-rename /usr/bin/clang-rename-9 9 | |
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 9 | |
sudo update-alternatives --install /usr/bin/clang-cpp clang-cpp /usr/bin/clang-cpp-9 9 | |
sudo update-alternatives --install /usr/bin/clang-include-fixer clang-include-fixer /usr/bin/clang-include-fixer-9 9 | |
sudo update-alternatives --install /usr/bin/clang-reorder-fields clang-reorder-fields /usr/bin/clang-reorder-fields-9 9 | |
sudo update-alternatives --install /usr/bin/clang-apply-replacements clang-apply-replacements /usr/bin/clang-apply-replacements-9 9 | |
sudo update-alternatives --install /usr/bin/clang-offload-bundler clang-offload-bundler /usr/bin/clang-offload-bu |
This file contains 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
## http://pastebin.com/sL6CPidx | |
## by Tanner__ from #prometheus | |
## not for production!!! | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: prometheus | |
data: | |
prometheus.yml: |- | |
global: |
This file contains 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
(ql:quickload :iolib) | |
(ql:quickload :eventfd) | |
(setf control-fd (eventfd:eventfd.new 0)) | |
(setf event-base (make-instance 'iolib:event-base)) | |
(setf thread (bt:make-thread (lambda () | |
(iolib:set-io-handler event-base | |
control-fd | |
:read (lambda (fd e ex) | |
(declare (ignorable fd e ex))) |
This file contains 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
/* stop all other threads by sending them SIG_STOP_FOR_GC */ | |
for(p=all_threads; p; p=p->next) { | |
gc_assert(p->os_thread != 0); | |
FSHOW_SIGNAL((stderr,"/gc_stop_the_world: thread=%lu, state=%x\n", | |
p->os_thread, thread_state(p))); | |
if((p!=th) && ((thread_state(p)==STATE_RUNNING))) { | |
FSHOW_SIGNAL((stderr,"/gc_stop_the_world: suspending thread %lu\n", | |
p->os_thread)); | |
/* We already hold all_thread_lock, P can become DEAD but | |
* cannot exit, ergo it's safe to use pthread_kill. */ |
This file contains 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
(with-pinned-objects (queue me) | |
(setf (waitqueue-token queue) me) | |
(release-mutex mutex) | |
;; Now we go to sleep using futex-wait. If anyone else | |
;; manages to grab MUTEX and call CONDITION-NOTIFY during | |
;; this comment, it will change the token, and so futex-wait | |
;; returns immediately instead of sleeping. Ergo, no lost | |
;; wakeup. We may get spurious wakeups, but that's ok. | |
(setf status | |
(case (allow-with-interrupts |
This file contains 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
(defun receive-message (mailbox &key timeout) | |
"Removes the oldest message from MAILBOX and returns it as the primary | |
value, and a secondary value of T. If MAILBOX is empty waits until a message | |
arrives. | |
If TIMEOUT is provided, and no message arrives within the specified interval, | |
returns primary and secondary value of NIL." | |
(tagbody | |
;; Disable interrupts for keeping semaphore count in sync with | |
;; #msgs in the mailbox. | |
(sb-sys:without-interrupts |
This file contains 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
(let* ((mailbox (sb-concurrency:make-mailbox)) | |
(event-base (make-instance 'iolib:event-base)) | |
(control-fd (eventfd:eventfd.new 0)) | |
(thread (bt:make-thread (lambda () | |
(iolib:set-io-handler event-base | |
control-fd | |
:read (lambda (fd e ex) | |
(declare (ignorable fd e ex)) | |
(log:debug (eventfd.read control-fd)))) | |
(loop (iolib:event-dispatch event-base :one-shot t)))))) |
I hereby claim:
- I am deadtrickster on github.
- I am deadtrickster (https://keybase.io/deadtrickster) on keybase.
- I have a public key whose fingerprint is 8838 3471 5B97 B18A 7B12 F958 76A9 29E1 8553 C165
To claim this, I am signing this object:
This file contains 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
https://github.com/elixir-lang/elixir/blob/f4b5e43fc10f6fd6ef84a5ceda8aa3c37131b5a1/lib/elixir/src/elixir_def.erl | |
https://github.com/elixir-lang/elixir/blob/133fc0c40ebdc179b14d51f3e853e3264fd18b5f/lib/elixir/src/elixir_locals.erl | |
https://github.com/elixir-lang/elixir/blob/f33c00bc73650c9ff6ab641b1ad88be9c5c69fc8/lib/elixir/src/elixir_dispatch.erl |
NewerOlder