| 1 | package Thread::State; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | our $VERSION = '0.09'; | ||
| 7 | |||
| 8 | require XSLoader; | ||
| 9 | XSLoader::load('Thread::State', $VERSION); | ||
| 10 | |||
| 11 | BEGIN { | ||
| 12 | if (threads->VERSION < 1.34) { | ||
| 13 | *threads::is_running = *threads::_is_running; | ||
| 14 | *threads::is_detached = *threads::_is_detached; | ||
| 15 | *threads::is_joinable = *threads::_is_joinable; | ||
| 16 | *threads::wantarray = *threads::_wantarray; | ||
| 17 | } | ||
| 18 | |||
| 19 | *threads::in_context = *threads::wantarray; # for old version | ||
| 20 | } | ||
| 21 | |||
| 22 | |||
| 23 | ################################################# | ||
| 24 | 1; | ||
| 25 | __END__ |