Results 1 to 5 of 5
  1. #1
    recneps is offline Member
    Join Date
    Feb 2009
    Posts
    2
    Rep Power
    0

    Default Using Coroutines

    Hey guys I'm in need of a little help here with using coroutines. I can find very little information on them on the internet.

    How are they constructed? I have seen on the internet that they are defined as such.

    Coroutine(java.lang.string producer, int x){
    }

    but when I do this it looks for a return type like a method.

    I have also seen this.

    Coroutine Producer=new Coroutine (int x, double y);

    But this comes up as not recognized.

    Also do I have to import a package to work with these coroutines? If so what is the package.

    How would I pause one coroutine while I start another?

    I know those are a lot of questions but I very much appreciate the help.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Please excuse my ignorance, but what exactly is a "Coroutine"? Is this part of standard Java? Part of a separate library? Please clarify this for the uninitiated.

  3. #3
    recneps is offline Member
    Join Date
    Feb 2009
    Posts
    2
    Rep Power
    0

    Default

    A coroutine is basically a subroutine that allows multiple entry points, you don't have to start it at the beginning every time.

    I am not sure if it is part of standard java or if it has to be imported. My professor will not help me at all.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Again, I don't know, but perhaps someone smarter than I can help out here. I thought that I've at least heard about all components of basic java even if I'm no expert in them, and I've never heard of this. Sorry I couldn't help more, but again, hopefully someone else will. Meanwhile, if you find any more information on this, please post it here.

    Best of luck.

  5. #5
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    8

    Default Coroutines ?

    OK, coroutines don't exist in the basic Java libraries as an API (concept of subroutines doesn't exist either in Java... they're all methods). It has to be a third party library (which has to be imported) or a plugin. The only time have had to work with subroutines was with assembler or basic.

    Luck,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •