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

#thread;; does not always work #483

Open
polytypic opened this issue Mar 27, 2024 · 0 comments
Open

#thread;; does not always work #483

polytypic opened this issue Mar 27, 2024 · 0 comments

Comments

@polytypic
Copy link

For some reason #thread;; does not always work:

────────┬─────────────────────────────────────────────────────────────┬────────
        │ Welcome to utop version 2.14.0 (using OCaml version 5.1.1)! │        
        └─────────────────────────────────────────────────────────────┘        
Findlib has been successfully loaded. Additional directives:
  #require "package";;      to load a package
  #list;;                   to list the available packages
  #camlp4o;;                to load camlp4 (standard syntax)
  #camlp4r;;                to load camlp4 (revised syntax)
  #predicates "p,q,...";;   to set these predicates
  Topfind.reset();;         to force that packages will be reloaded
  #thread;;                 to enable threads


Type #utop_help for help about using utop.

─( 13:51:22 )─< command 0 >─────────────────────────────────────{ counter: 0 }─
utop # #thread;;
─( 13:51:22 )─< command 1 >─────────────────────────────────────{ counter: 0 }─
utop # Thread.create;;
Error: Unbound module Thread
─( 13:51:28 )─< command 2 >─────────────────────────────────────{ counter: 0 }─
utop # #require "threads.posix";;
─( 13:51:35 )─< command 3 >─────────────────────────────────────{ counter: 0 }─
utop # Thread.create;;
- : ('a -> 'b) -> 'a -> Thread.t = <fun>
─( 13:51:47 )─< command 4 >─────────────────────────────────────{ counter: 0 }─
utop # 

Notice how after #thread;; the Thread module is not available. However, after #require "threads.posix";; the Thread module becomes available.

The above output was produced on macOS.

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