Skip to content

Commit

Permalink
remove sync(Weave) before exit and allow failure on OSX) (#52)
Browse files Browse the repository at this point in the history
* remove sync(Weave) before exit and allow failure on OSX)

* Disable tlsEmulation
  • Loading branch information
mratsim authored Dec 15, 2019
1 parent 6b7b8c3 commit a2e118b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ matrix:
- ARCH=amd64
- CHANNEL=devel
compiler: clang
allow_failures:
# Also ignore OSX, due to very long build time
# and strange issues: https://github.com/mratsim/weave/issues/51
- os: osx
fast_finish: true

before_install:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Weave, a state-of-the-art multithreading runtime
[![Build Status: Travis](https://img.shields.io/travis/com/mratsim/weave?label=Travis%20%28Linux%2FMac%20-%20x86_64%2FARM64%29)](https://travis-ci.com/mratsim/weave)
[![Build Status: Travis](https://img.shields.io/travis/com/mratsim/weave?label=Travis%20%28Linux%20x86_64%2FARM64%20-%20OSX%20optional%29)](https://travis-ci.com/mratsim/weave)
[![Build Status: Azure](https://img.shields.io/azure-devops/build/numforge/69bc2700-4fa7-4292-a0b3-331ddb721640/2?label=Azure%20%28C%2FC%2B%2B%20Linux%2032-bit%2F64-bit%29)](https://dev.azure.com/numforge/Weave/_build?definitionId=2&branchName=master)
[![License: Apache](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
Expand Down
4 changes: 4 additions & 0 deletions weave.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Nim has tlsEmulation enabled on OSX
# instead of using the C compiler TLS.
# This was due to old iOS versions requiring it.
--tlsEmulation:off
5 changes: 4 additions & 1 deletion weave/config.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@

import strutils

# With C++ we need C++11
# Platform support
# ----------------------------------------------------------------------------------

when defined(cpp):
{.passC:"-std=c++11".}

when defined(tlsEmulation):
{.warning: "TLS Emulation (default on MacOS due to old iOS requiring it) is not supported. Please run Weave tests to ensure some degree of correctness.".}

# Static configuration & compile-time options
# ----------------------------------------------------------------------------------

Expand Down
6 changes: 0 additions & 6 deletions weave/parallel_tasks.nim
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,8 @@ when isMainModule:
echo "Sanity check 1: Printing 123456 654321 in parallel"

init(Weave)

spawn display_int(123456)
spawn display_int(654321)

sync(Weave)
exit(Weave)

main()
Expand All @@ -192,10 +189,7 @@ when isMainModule:
echo "Sanity check 2: fib(20)"

init(Weave)

let f = async_fib(20)

sync(Weave)
exit(Weave)

echo f
Expand Down

0 comments on commit a2e118b

Please sign in to comment.