Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006624OCaml~DO NOT USE (was: OCaml general)public2014-10-22 21:182016-12-07 11:47
Reporterwhitequark 
Assigned Togasche 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.03.0+dev / +beta1 
Summary0006624: Allow Android builds with systhreads
DescriptionAndroid lacks declarations for pthread_cancel and pthread_atfork, the reasons and workarounds for which are provided in the attached patch.
TagsNo tags attached.
Attached Filespatch file icon 0004-Allow-Android-builds-with-systhreads-support.patch [^] (1,987 bytes) 2014-10-22 21:18 [Show Content]

- Relationships

-  Notes
(0012415)
gasche (administrator)
2014-10-23 00:00

My (weak) understanding is that your patch completely silences st_thread_kill on Android. How does that not cause trouble further down? The only use of st_thread_kill I see is in caml_thread_cleanup, which is called by caml_thread_stop and also exposed as an external primitive.
(0012416)
whitequark (developer)
2014-10-23 00:05

The point is a bit moot, because Android simply does not have any way to do what st_thread_kill does. On a second thought I probably should raise some exception inside st_thread_kill instead (there is simply no way to actually kill the thread on Android, and using Thread.kill is extremely bad design anyway). Do you know which one?
(0012417)
whitequark (developer)
2014-10-23 00:06

By the way, I think a note should be added to Thread.kill elaborating why it should not be used. If you need further convincing, this page provides a very detailed description of the reasons behind it: http://docs.oracle.com/javase/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html [^]
(0012801)
gasche (administrator)
2014-12-13 23:37

Merged in trunk.
(0013287)
gasche (administrator)
2015-02-15 19:15

This is also included in branch 4.02 as commit 15708.

- Issue History
Date Modified Username Field Change
2014-10-22 21:18 whitequark New Issue
2014-10-22 21:18 whitequark File Added: 0004-Allow-Android-builds-with-systhreads-support.patch
2014-10-23 00:00 gasche Note Added: 0012415
2014-10-23 00:05 whitequark Note Added: 0012416
2014-10-23 00:06 whitequark Note Added: 0012417
2014-12-13 23:37 gasche Note Added: 0012801
2014-12-13 23:37 gasche Status new => resolved
2014-12-13 23:37 gasche Fixed in Version => 4.03.0+dev / +beta1
2014-12-13 23:37 gasche Resolution open => fixed
2014-12-13 23:37 gasche Assigned To => gasche
2015-02-15 19:15 gasche Note Added: 0013287
2016-12-07 11:47 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker