One of my threads seems to exit earlier than I expected in my consumer/producer codeHow should I unit test threaded code?Cross-thread operation not valid: Control accessed from a thread other than the thread it was created onWhat is PECS (Producer Extends Consumer Super)?Execute method from a different thread than the one it's called fromCan't start Eclipse - Java was started but returned exit code=13ActiveMQ some consumers not picking up tasks if they arrive after producerThreads On Normal Vs Maximum PriorityStrange java behavior of wait/notifyOptimizing interaction between Producer - Consumer threadsExecutorService workStealingPool and cancel method

What does this line mean in Zelazny's "The Courts of Chaos"?

Does it make sense to use a wavelet that is equal to a sine of one period?

Why would a home insurer offer a discount based on credit score?

What plausible reason could I give for my FTL drive only working in space

Was self-modifying code possible using BASIC?

Why do the TIE Fighter pilot helmets have similar ridges as the rebels?

Why are Payments from Apple to New Zealand and Australian bank accounts wire transfers?

Why did the World Bank set the global poverty line at $1.90?

After an 87 day stay in the USA, can I return for a long weekend? (ESTA)

How to avoid typing 'git' at the begining of every Git command

Why is my power MOSFET heating up when on?

If I had a daughter who (is/were/was) cute, I would be very happy

Is it safe to remove Python 2.7.15rc1 from Ubuntu 18.04?

What exactly "triggers an additional time" in the interaction between Afterlife and Teysa Karlov?

Part of my house is inexplicably gone

Find all letter Combinations of a Phone Number

Professor Roman loves to teach unorthodox Chemistry

How to show a "node near coord" even when it is out of bounds (with clip = true)?

Make Gimbap cutter

What do you call the action of "describing events as they happen" like sports anchors do?

Why is the distribution of dark matter in a Galaxy different from the distribution of normal matter?

Mathematica 12 has gotten worse at solving simple equations?

How to represent jealousy in a cute way?

bash vs. zsh: What are the practical differences?



One of my threads seems to exit earlier than I expected in my consumer/producer code


How should I unit test threaded code?Cross-thread operation not valid: Control accessed from a thread other than the thread it was created onWhat is PECS (Producer Extends Consumer Super)?Execute method from a different thread than the one it's called fromCan't start Eclipse - Java was started but returned exit code=13ActiveMQ some consumers not picking up tasks if they arrive after producerThreads On Normal Vs Maximum PriorityStrange java behavior of wait/notifyOptimizing interaction between Producer - Consumer threadsExecutorService workStealingPool and cancel method






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















So I am trying to make a simple producer/consumer code in java. My producer seems to work just fine however it reaches a point where it produces 10 items and then just stops producing items. Then I have to wait for the consumer to remove the 10 items added to the array List and I am left with the consumer having nothing left to consume since the producer doesn't add to the list.



I initially thought that for some reason the code seems to be breaking out of the while loop in my producer class but it could never do that so I'm honestly lost. Here is my code



import java.util.Random;

public class Main


public static boolean eating = true;
private static ArrayList<Integer> buffet = new ArrayList<Integer>(10);

public static void main(String[] args) throws InterruptedException

//make our producer
Thread producerThread = new Thread(new Runnable()
@Override
public void run()
producer();
System.out.println("BUFFET IS CLOSED, NO MORE FOOD TO MAKE");

);

//make our consumer
Thread consumerThread = new Thread(new Runnable()
@Override
public void run()
consumer();

);

producerThread.start();
consumerThread.start();

consumerThread.join();
producerThread.join();




private static void producer()

Random randomCooking = new Random();

while(true)
if(buffet.size() < 10)
System.out.println("Producer added a dish");
buffet.add(randomCooking.nextInt(5));
try
Thread.sleep(1000);
catch (InterruptedException e)
e.printStackTrace();









private static void consumer()

Random randomEating = new Random();

while (true)
try
Thread.sleep(500);

if (randomEating.nextInt(5) == 0)

if(buffet.size() > 0)

Integer value = buffet.remove(buffet.size() - 1);

switch (value)
case 0:
System.out.println("Dish 0: Shrimp & Rice, eaten by consumer! Dishes left: " + buffet.size());
break;
case 1:
System.out.println("Dish 1: Mashed Potatoes and Gravey, eaten by consumer! Dishes left: " + buffet.size());
break;
case 2:
System.out.println("Dish 2: Spaghetti and Meatballs, eaten by consumer! Dishes left: " + buffet.size());
break;
case 3:
System.out.println("Dish 3: Burger & Fries, eaten by consumer! Dishes left: " + buffet.size());
break;
case 4:
System.out.println("Dish 4: Salad & Tofu, eaten by consumer! Dishes left: " + buffet.size());
break;


else
System.out.println("Food is all finished");



else
System.out.println("consumer decided not to eat! Dishes left: " + buffet.size() );


catch(InterruptedException e)
e.printStackTrace();









After a while this is all I am left with



consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
Food is all finished
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0









share|improve this question






















  • You're modifying an ArrayList, which is not thread-safe, from two concurrent threads, and without any kind of synchronization. That can't possibly work in a correct way. Multi-threading is a complex matter. You need to study it, seriously.

    – JB Nizet
    Mar 24 at 22:54












  • Yes, I just figured out about the synchronized(this) call that I can make so I am just figuring out how to use that. But even using that call my code still only adds 10 items and then stops adding items after they are consumed.

    – cs_._._
    Mar 24 at 22:59












  • For one thing, when your producer hits 10 items, it goes into a busy-loop consuming 100% on one CPU. And it probably won't see any updates the the list length because you haven't used proper concurrency techniques, so it will remain in a busy-loop for a long while, possibly forever.

    – Erwin Bolwidt
    Mar 24 at 23:21











  • Ohhh ok that makes perfect sense. That's why it never actually finishes the run function it is just in a busy-loop for that whole time after producing 10 items!

    – cs_._._
    Mar 24 at 23:37

















0















So I am trying to make a simple producer/consumer code in java. My producer seems to work just fine however it reaches a point where it produces 10 items and then just stops producing items. Then I have to wait for the consumer to remove the 10 items added to the array List and I am left with the consumer having nothing left to consume since the producer doesn't add to the list.



I initially thought that for some reason the code seems to be breaking out of the while loop in my producer class but it could never do that so I'm honestly lost. Here is my code



import java.util.Random;

public class Main


public static boolean eating = true;
private static ArrayList<Integer> buffet = new ArrayList<Integer>(10);

public static void main(String[] args) throws InterruptedException

//make our producer
Thread producerThread = new Thread(new Runnable()
@Override
public void run()
producer();
System.out.println("BUFFET IS CLOSED, NO MORE FOOD TO MAKE");

);

//make our consumer
Thread consumerThread = new Thread(new Runnable()
@Override
public void run()
consumer();

);

producerThread.start();
consumerThread.start();

consumerThread.join();
producerThread.join();




private static void producer()

Random randomCooking = new Random();

while(true)
if(buffet.size() < 10)
System.out.println("Producer added a dish");
buffet.add(randomCooking.nextInt(5));
try
Thread.sleep(1000);
catch (InterruptedException e)
e.printStackTrace();









private static void consumer()

Random randomEating = new Random();

while (true)
try
Thread.sleep(500);

if (randomEating.nextInt(5) == 0)

if(buffet.size() > 0)

Integer value = buffet.remove(buffet.size() - 1);

switch (value)
case 0:
System.out.println("Dish 0: Shrimp & Rice, eaten by consumer! Dishes left: " + buffet.size());
break;
case 1:
System.out.println("Dish 1: Mashed Potatoes and Gravey, eaten by consumer! Dishes left: " + buffet.size());
break;
case 2:
System.out.println("Dish 2: Spaghetti and Meatballs, eaten by consumer! Dishes left: " + buffet.size());
break;
case 3:
System.out.println("Dish 3: Burger & Fries, eaten by consumer! Dishes left: " + buffet.size());
break;
case 4:
System.out.println("Dish 4: Salad & Tofu, eaten by consumer! Dishes left: " + buffet.size());
break;


else
System.out.println("Food is all finished");



else
System.out.println("consumer decided not to eat! Dishes left: " + buffet.size() );


catch(InterruptedException e)
e.printStackTrace();









After a while this is all I am left with



consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
Food is all finished
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0









share|improve this question






















  • You're modifying an ArrayList, which is not thread-safe, from two concurrent threads, and without any kind of synchronization. That can't possibly work in a correct way. Multi-threading is a complex matter. You need to study it, seriously.

    – JB Nizet
    Mar 24 at 22:54












  • Yes, I just figured out about the synchronized(this) call that I can make so I am just figuring out how to use that. But even using that call my code still only adds 10 items and then stops adding items after they are consumed.

    – cs_._._
    Mar 24 at 22:59












  • For one thing, when your producer hits 10 items, it goes into a busy-loop consuming 100% on one CPU. And it probably won't see any updates the the list length because you haven't used proper concurrency techniques, so it will remain in a busy-loop for a long while, possibly forever.

    – Erwin Bolwidt
    Mar 24 at 23:21











  • Ohhh ok that makes perfect sense. That's why it never actually finishes the run function it is just in a busy-loop for that whole time after producing 10 items!

    – cs_._._
    Mar 24 at 23:37













0












0








0


1






So I am trying to make a simple producer/consumer code in java. My producer seems to work just fine however it reaches a point where it produces 10 items and then just stops producing items. Then I have to wait for the consumer to remove the 10 items added to the array List and I am left with the consumer having nothing left to consume since the producer doesn't add to the list.



I initially thought that for some reason the code seems to be breaking out of the while loop in my producer class but it could never do that so I'm honestly lost. Here is my code



import java.util.Random;

public class Main


public static boolean eating = true;
private static ArrayList<Integer> buffet = new ArrayList<Integer>(10);

public static void main(String[] args) throws InterruptedException

//make our producer
Thread producerThread = new Thread(new Runnable()
@Override
public void run()
producer();
System.out.println("BUFFET IS CLOSED, NO MORE FOOD TO MAKE");

);

//make our consumer
Thread consumerThread = new Thread(new Runnable()
@Override
public void run()
consumer();

);

producerThread.start();
consumerThread.start();

consumerThread.join();
producerThread.join();




private static void producer()

Random randomCooking = new Random();

while(true)
if(buffet.size() < 10)
System.out.println("Producer added a dish");
buffet.add(randomCooking.nextInt(5));
try
Thread.sleep(1000);
catch (InterruptedException e)
e.printStackTrace();









private static void consumer()

Random randomEating = new Random();

while (true)
try
Thread.sleep(500);

if (randomEating.nextInt(5) == 0)

if(buffet.size() > 0)

Integer value = buffet.remove(buffet.size() - 1);

switch (value)
case 0:
System.out.println("Dish 0: Shrimp & Rice, eaten by consumer! Dishes left: " + buffet.size());
break;
case 1:
System.out.println("Dish 1: Mashed Potatoes and Gravey, eaten by consumer! Dishes left: " + buffet.size());
break;
case 2:
System.out.println("Dish 2: Spaghetti and Meatballs, eaten by consumer! Dishes left: " + buffet.size());
break;
case 3:
System.out.println("Dish 3: Burger & Fries, eaten by consumer! Dishes left: " + buffet.size());
break;
case 4:
System.out.println("Dish 4: Salad & Tofu, eaten by consumer! Dishes left: " + buffet.size());
break;


else
System.out.println("Food is all finished");



else
System.out.println("consumer decided not to eat! Dishes left: " + buffet.size() );


catch(InterruptedException e)
e.printStackTrace();









After a while this is all I am left with



consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
Food is all finished
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0









share|improve this question














So I am trying to make a simple producer/consumer code in java. My producer seems to work just fine however it reaches a point where it produces 10 items and then just stops producing items. Then I have to wait for the consumer to remove the 10 items added to the array List and I am left with the consumer having nothing left to consume since the producer doesn't add to the list.



I initially thought that for some reason the code seems to be breaking out of the while loop in my producer class but it could never do that so I'm honestly lost. Here is my code



import java.util.Random;

public class Main


public static boolean eating = true;
private static ArrayList<Integer> buffet = new ArrayList<Integer>(10);

public static void main(String[] args) throws InterruptedException

//make our producer
Thread producerThread = new Thread(new Runnable()
@Override
public void run()
producer();
System.out.println("BUFFET IS CLOSED, NO MORE FOOD TO MAKE");

);

//make our consumer
Thread consumerThread = new Thread(new Runnable()
@Override
public void run()
consumer();

);

producerThread.start();
consumerThread.start();

consumerThread.join();
producerThread.join();




private static void producer()

Random randomCooking = new Random();

while(true)
if(buffet.size() < 10)
System.out.println("Producer added a dish");
buffet.add(randomCooking.nextInt(5));
try
Thread.sleep(1000);
catch (InterruptedException e)
e.printStackTrace();









private static void consumer()

Random randomEating = new Random();

while (true)
try
Thread.sleep(500);

if (randomEating.nextInt(5) == 0)

if(buffet.size() > 0)

Integer value = buffet.remove(buffet.size() - 1);

switch (value)
case 0:
System.out.println("Dish 0: Shrimp & Rice, eaten by consumer! Dishes left: " + buffet.size());
break;
case 1:
System.out.println("Dish 1: Mashed Potatoes and Gravey, eaten by consumer! Dishes left: " + buffet.size());
break;
case 2:
System.out.println("Dish 2: Spaghetti and Meatballs, eaten by consumer! Dishes left: " + buffet.size());
break;
case 3:
System.out.println("Dish 3: Burger & Fries, eaten by consumer! Dishes left: " + buffet.size());
break;
case 4:
System.out.println("Dish 4: Salad & Tofu, eaten by consumer! Dishes left: " + buffet.size());
break;


else
System.out.println("Food is all finished");



else
System.out.println("consumer decided not to eat! Dishes left: " + buffet.size() );


catch(InterruptedException e)
e.printStackTrace();









After a while this is all I am left with



consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0
Food is all finished
consumer decided not to eat! Dishes left: 0
consumer decided not to eat! Dishes left: 0






java multithreading arraylist while-loop thread-safety






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 24 at 22:51









cs_._._cs_._._

124




124












  • You're modifying an ArrayList, which is not thread-safe, from two concurrent threads, and without any kind of synchronization. That can't possibly work in a correct way. Multi-threading is a complex matter. You need to study it, seriously.

    – JB Nizet
    Mar 24 at 22:54












  • Yes, I just figured out about the synchronized(this) call that I can make so I am just figuring out how to use that. But even using that call my code still only adds 10 items and then stops adding items after they are consumed.

    – cs_._._
    Mar 24 at 22:59












  • For one thing, when your producer hits 10 items, it goes into a busy-loop consuming 100% on one CPU. And it probably won't see any updates the the list length because you haven't used proper concurrency techniques, so it will remain in a busy-loop for a long while, possibly forever.

    – Erwin Bolwidt
    Mar 24 at 23:21











  • Ohhh ok that makes perfect sense. That's why it never actually finishes the run function it is just in a busy-loop for that whole time after producing 10 items!

    – cs_._._
    Mar 24 at 23:37

















  • You're modifying an ArrayList, which is not thread-safe, from two concurrent threads, and without any kind of synchronization. That can't possibly work in a correct way. Multi-threading is a complex matter. You need to study it, seriously.

    – JB Nizet
    Mar 24 at 22:54












  • Yes, I just figured out about the synchronized(this) call that I can make so I am just figuring out how to use that. But even using that call my code still only adds 10 items and then stops adding items after they are consumed.

    – cs_._._
    Mar 24 at 22:59












  • For one thing, when your producer hits 10 items, it goes into a busy-loop consuming 100% on one CPU. And it probably won't see any updates the the list length because you haven't used proper concurrency techniques, so it will remain in a busy-loop for a long while, possibly forever.

    – Erwin Bolwidt
    Mar 24 at 23:21











  • Ohhh ok that makes perfect sense. That's why it never actually finishes the run function it is just in a busy-loop for that whole time after producing 10 items!

    – cs_._._
    Mar 24 at 23:37
















You're modifying an ArrayList, which is not thread-safe, from two concurrent threads, and without any kind of synchronization. That can't possibly work in a correct way. Multi-threading is a complex matter. You need to study it, seriously.

– JB Nizet
Mar 24 at 22:54






You're modifying an ArrayList, which is not thread-safe, from two concurrent threads, and without any kind of synchronization. That can't possibly work in a correct way. Multi-threading is a complex matter. You need to study it, seriously.

– JB Nizet
Mar 24 at 22:54














Yes, I just figured out about the synchronized(this) call that I can make so I am just figuring out how to use that. But even using that call my code still only adds 10 items and then stops adding items after they are consumed.

– cs_._._
Mar 24 at 22:59






Yes, I just figured out about the synchronized(this) call that I can make so I am just figuring out how to use that. But even using that call my code still only adds 10 items and then stops adding items after they are consumed.

– cs_._._
Mar 24 at 22:59














For one thing, when your producer hits 10 items, it goes into a busy-loop consuming 100% on one CPU. And it probably won't see any updates the the list length because you haven't used proper concurrency techniques, so it will remain in a busy-loop for a long while, possibly forever.

– Erwin Bolwidt
Mar 24 at 23:21





For one thing, when your producer hits 10 items, it goes into a busy-loop consuming 100% on one CPU. And it probably won't see any updates the the list length because you haven't used proper concurrency techniques, so it will remain in a busy-loop for a long while, possibly forever.

– Erwin Bolwidt
Mar 24 at 23:21













Ohhh ok that makes perfect sense. That's why it never actually finishes the run function it is just in a busy-loop for that whole time after producing 10 items!

– cs_._._
Mar 24 at 23:37





Ohhh ok that makes perfect sense. That's why it never actually finishes the run function it is just in a busy-loop for that whole time after producing 10 items!

– cs_._._
Mar 24 at 23:37












1 Answer
1






active

oldest

votes


















0














ArrayList is not suited for concurrent access. It means if a thread modifies it and multiple threads access it concurrently, it must be synchronized externally. The simplest you can do - wrap it in synchronized counterpart and synchronize access to it:



List<Integer> buffet = Collections.synchronizedList(new ArrayList<>());
...
while (true)
synchronized (buffet)
// perform your operations




Failure to follow this advice may result in non-deterministic behavior - as explicitly mentioned in the documentation (and, basically, what you are observing).



However, typically, the most useful data-structure for producer-consumer problems is BlockingQueue. So you can use some of its implementations, e.g. ArrayBlockingQueue or LinkedBlockingQueue.






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55329346%2fone-of-my-threads-seems-to-exit-earlier-than-i-expected-in-my-consumer-producer%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    ArrayList is not suited for concurrent access. It means if a thread modifies it and multiple threads access it concurrently, it must be synchronized externally. The simplest you can do - wrap it in synchronized counterpart and synchronize access to it:



    List<Integer> buffet = Collections.synchronizedList(new ArrayList<>());
    ...
    while (true)
    synchronized (buffet)
    // perform your operations




    Failure to follow this advice may result in non-deterministic behavior - as explicitly mentioned in the documentation (and, basically, what you are observing).



    However, typically, the most useful data-structure for producer-consumer problems is BlockingQueue. So you can use some of its implementations, e.g. ArrayBlockingQueue or LinkedBlockingQueue.






    share|improve this answer





























      0














      ArrayList is not suited for concurrent access. It means if a thread modifies it and multiple threads access it concurrently, it must be synchronized externally. The simplest you can do - wrap it in synchronized counterpart and synchronize access to it:



      List<Integer> buffet = Collections.synchronizedList(new ArrayList<>());
      ...
      while (true)
      synchronized (buffet)
      // perform your operations




      Failure to follow this advice may result in non-deterministic behavior - as explicitly mentioned in the documentation (and, basically, what you are observing).



      However, typically, the most useful data-structure for producer-consumer problems is BlockingQueue. So you can use some of its implementations, e.g. ArrayBlockingQueue or LinkedBlockingQueue.






      share|improve this answer



























        0












        0








        0







        ArrayList is not suited for concurrent access. It means if a thread modifies it and multiple threads access it concurrently, it must be synchronized externally. The simplest you can do - wrap it in synchronized counterpart and synchronize access to it:



        List<Integer> buffet = Collections.synchronizedList(new ArrayList<>());
        ...
        while (true)
        synchronized (buffet)
        // perform your operations




        Failure to follow this advice may result in non-deterministic behavior - as explicitly mentioned in the documentation (and, basically, what you are observing).



        However, typically, the most useful data-structure for producer-consumer problems is BlockingQueue. So you can use some of its implementations, e.g. ArrayBlockingQueue or LinkedBlockingQueue.






        share|improve this answer















        ArrayList is not suited for concurrent access. It means if a thread modifies it and multiple threads access it concurrently, it must be synchronized externally. The simplest you can do - wrap it in synchronized counterpart and synchronize access to it:



        List<Integer> buffet = Collections.synchronizedList(new ArrayList<>());
        ...
        while (true)
        synchronized (buffet)
        // perform your operations




        Failure to follow this advice may result in non-deterministic behavior - as explicitly mentioned in the documentation (and, basically, what you are observing).



        However, typically, the most useful data-structure for producer-consumer problems is BlockingQueue. So you can use some of its implementations, e.g. ArrayBlockingQueue or LinkedBlockingQueue.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 24 at 23:18

























        answered Mar 24 at 23:03









        ZgurskyiZgurskyi

        1,404179




        1,404179





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55329346%2fone-of-my-threads-seems-to-exit-earlier-than-i-expected-in-my-consumer-producer%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해