File tree 4 files changed +17
-7
lines changed
4 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 58
58
*/
59
59
60
60
#include "sys-core.h"
61
- //#define INCLUDE_TASK
62
61
63
62
#ifdef INCLUDE_TASK
64
63
/***********************************************************************
99
98
{
100
99
#ifdef INCLUDE_TASK
101
100
OS_CREATE_THREAD ((void * )Launch_Task , task , 50000 );
102
- #else
103
- puts ("** Build using INCLUDE_TASK define to experiment with task!" );
104
- Trap0 (RE_FEATURE_NA );
105
101
#endif
106
102
}
103
+
Original file line number Diff line number Diff line change @@ -315,6 +315,7 @@ static REBSER *Trim_Object(REBSER *obj)
315
315
316
316
// make task! [init]
317
317
if (type == REB_TASK ) {
318
+ #ifdef INCLUDE_TASK
318
319
// Does it include a spec?
319
320
VAL_SET (value , REB_TASK );
320
321
if (IS_BLOCK (VAL_BLK (arg ))) {
@@ -328,6 +329,9 @@ static REBSER *Trim_Object(REBSER *obj)
328
329
}
329
330
VAL_MOD_FRAME (value ) = obj ;
330
331
DS_RET_VALUE (value );
332
+ #else
333
+ Trap0 (RE_FEATURE_NA );
334
+ #endif
331
335
return R_RET ;
332
336
}
333
337
}
Original file line number Diff line number Diff line change 49
49
#define HAS_SHA1 // allow it
50
50
#define HAS_SHA2 // allow SHA 256/384/512
51
51
#define HAS_MD5 // allow it
52
+ //#define INCLUDE_TASK
52
53
53
54
// External system includes:
54
55
#include <stdlib.h>
Original file line number Diff line number Diff line change 9
9
~~~start-file~~~ "TASK!"
10
10
11
11
===start-group=== "task"
12
- --test-- "issues-47"
13
- ;@@ https://github.com/Oldes/Rebol-issues/issues/47
14
- --assert error? try [do make task! [2 / 0 ]] ; trying to evaluate a task should not crash!
12
+ if any [
13
+ not error? test-task: try [make task! []] ; task may be disabled
14
+ test-task/id <> 'feature-na
15
+ ][
16
+ --test-- "empty task"
17
+ --assert task? do test-task
18
+
19
+ --test-- "issues-47"
20
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/47
21
+ --assert task? do make task! [1 / 0 ] ; trying to evaluate a task should not crash!
22
+ ]
15
23
16
24
===end-group===
17
25
You can’t perform that action at this time.
0 commit comments