Giter VIP home page Giter VIP logo

juliabook-samples's People

Contributors

isuke avatar yomichi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

isuke juliatagbot

juliabook-samples's Issues

P86 の @time @sync begin ... のコードは 5秒かかると思います。

i には 1,2,3,4,5 が入り、sleep(5) が max なので 5秒かかると思います。

julia> @time @sync begin
           for i in 1:5
               @async (sleep(i); println("$i $(now())"))
           end
           println("0 $(now())")
       end
0 2020-01-28T14:18:18.968
1 2020-01-28T14:18:19.99
2 2020-01-28T14:18:20.99
3 2020-01-28T14:18:21.989
4 2020-01-28T14:18:22.988
5 2020-01-28T14:18:23.989
  5.020843 seconds (55.86 k allocations: 2.693 MiB)

Binding readall does not exist.

P66 で出てくる readall ですが、無いと言われてしまいます。Julia の VERSION は 1.3.1 です。

julia> VERSION
v"1.3.1"

help?> readall
search: @threadcall readavailable isreadable

Couldn't find readall
Perhaps you meant read, read!, readdir, real, findall or @threadcall
  No documentation found.

  Binding readall does not exist.

julia> 

P85 の Task 定義の ) の位置が違って動かないです

42 が promise に入っていないので syntax エラーになります。

julia> task = Task(() -> (sleep(1); println(now())); 42)
ERROR: syntax: invalid keyword argument syntax "42"
Stacktrace:
 [1] top-level scope at REPL[64]:1

task = Task(() -> (sleep(1); println(now())); 42)

task = Task(() -> (sleep(1); println(now()); 42))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.