New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C functions required to be called once in one thread are hung up #5779
Comments
From @titsukiI'm creating a Perl 6 bindings for MeCab ( http://taku910.github.io/mecab/ \) See the following codes and documentations(translations). My repository is: The following subtest in the t/02-lattice.t in the above repository is hung up. subtest { my @actual = (@texts.hyper(:batch(1))\ my Str $r1 = ("私\t名詞,代名詞,一般,*,*,*,私,ワタシ,ワタシ\nEOS\n"); In the MeCab documentation page(Japanese) https://taku910.github.io/mecab/libmecab.html * Call MeCab::createModel() and create the Model object. * Call model->createTagger and create the Tagger object. The Tagger objects share the same model, even though you create the multiple models under the one model per thread constraint. * Call model->createLattice or MeCab::createLattice() and crate the Lattice object. The Lattice objects include all local variables for the morpheme analyze. Must keep the constraint that you can create only one object per thread. * model->swap(antoher_model) function replaces the Tagger object models created from the invocant model by another_model. This operation is thread-safe. I think I properly call the MeCab functions from Perl 6(e.g. $model.create-tagger, $model.create-lattice) according to the above instructions. |
From @geekosaurOn Tue, Nov 1, 2016 at 12:01 PM, Itsuki Toyota <perl6-bugs-followup@perl.org
Not sure NativeCall even knows about TLS as yet. Probably needs a new -- |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Tue Nov 01 09:01:04 2016, cookbook_000@yahoo.co.jp wrote:
I think the hang was due to long-running native functions called on one thread blocking GC (and thus progress) in all other threads. That is addressed in MoarVM/MoarVM@5c65917 and MoarVM/MoarVM@f769569 and tested in rakudo/rakudo@5ba75f4. If you still have problems, please re-open this issue. Also, if possible, see if you can find a smaller reproduction (for example, try just running the code in a number of start blocks, or threads, instead of using `.hyper`). Thanks, /jnthn |
@jnthn - Status changed from 'open' to 'resolved' |
From @titsukiOn 2016-11月-02 水 06:30:25, jnthn@jnthn.net wrote:
Thanks a lot ! |
Migrated from rt.perl.org#129994 (status was 'resolved')
Searchable as RT129994$
The text was updated successfully, but these errors were encountered: