The Wayback Machine - https://web.archive.org/web/20221028092746/https://github.com/objectionary/eo-threads
Skip to content

objectionary/eo-threads

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
pdd
Aug 24, 2022
Aug 24, 2022
pdd
Aug 24, 2022
Aug 30, 2022
Aug 24, 2022
Sep 15, 2022

EO principles respected here DevOps By Rultor.com We recommend IntelliJ IDEA

mvn PDD status codecov Hits-of-Code Lines of code License

EO objects for managing execution threads.

To run slow code in a new thread and wait for its finish in a loop:

while.
  is-running.
    start.
      QQ.threads.thread > t
        very-slow-object
  [i]
    seq > @
      QQ.io.stdout
        "still waiting..."
      QQ.threads.sleep
        100
      if.
        i.gt 10
        t.stop
        TRUE

The object thread has attributes:

  • free attribute slow to set a task to the thread.
  • started starts the thread or does nothing if it's already running, returns the thread
  • is-running is TRUE if it is still working
  • stop informs the thread it must be terminated.
  • join returns the result of dataization slow.

Dataization of the thread.join object means dataized slow. If the thread is terminated, dataization returns error.

How to Contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

$ mvn clean install -Pqulice

You will need Maven 3.3+ and Java 8+.