Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronization context & Document Binding #1

Open
mdrobulis opened this issue Mar 18, 2017 · 1 comment
Open

Synchronization context & Document Binding #1

mdrobulis opened this issue Mar 18, 2017 · 1 comment
Assignees

Comments

@mdrobulis
Copy link
Owner

using global static reference to bind document to a symbol in user namespace is bad idea.
It works, but its bad.

@mdrobulis
Copy link
Owner Author

mdrobulis commented Mar 21, 2017

UI Console has the IExecutor bound to "sync" symbol...

usage:

(def p (. sync Run (fn [active-doc] (. active-doc Title))) ;; returns a promise instantly,
;; queues your fn for execution on revit transaction
(deref p) ;; blocks repl thread, till promise is delivered
@p ;; does the same, with extra syntax sugar
(realized? p) ;; does not block, tells you if p is delivered.

Socket repl does not support this yet, but it will, cuz i like Emacs too much.

@mdrobulis mdrobulis self-assigned this Mar 21, 2017
@mdrobulis mdrobulis changed the title Document Binding Synchronization context & Document Binding Mar 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant