Questions tagged [notify]

A notification system is a combination of software and hardware that provides a means of delivering a message to a set of recipients.

notify
Filter by
Sorted by
Tagged with
0 votes
2 answers
3k views

Java, force program to wait for click inside while loop

Okay so this isn't great code, but basically I need to force a more complicated version of this program to wait for a click while inside of a while loop. Any help on making the waitForClick() method ...
David Aaron's user avatar
3 votes
1 answer
940 views

SignalR notifying both asp.net and web api clients host on separate site

I'm going to build my own system include asp.net web site and web api, they are host on separate site. Architect diagram like image link below. Every time client update something. I need to notify ...
Thu Nguyen's user avatar
-4 votes
1 answer
113 views

Java release lock after notify causes new threads to appear

![enter image description here][1]does anyone have an idea regarding to why new threads are created when releasing lock after notifyall? I have one thread listening for request status (STRING) to ...
asafb's user avatar
  • 92
5 votes
1 answer
1k views

Remote linux desktop notification using notify-send

I've made a client - server system in zmq which would help send mass notifications to people logged onto all the machines on the network. The client daemons are running under root on all of the ...
user2252999's user avatar
2 votes
1 answer
4k views

Java executors: How to notify a single waiting thread within the executer?

So here is what I'm trying to accomplish: I have a FixedThreadPool with 5 Threads in it. Those threads just sit there and wait to be notified. When notified, the thread within the pool starts to do ...
Joseph Müller's user avatar
0 votes
2 answers
92 views

How to know when process finishes always?

I am doing a program in which I have to wait a process to finish to continue their execution. I made the next: synchronized (obj) { try{ Process p = Runtime.getRuntime().exec(command); p....
Jose M.'s user avatar
1 vote
1 answer
2k views

QML dictionary (jsobject, var) sub-properties notify

Is it possible to raise notify-method of a var/variant/object/ (etc.) variables automatically during updating? Suppose I have: property var objects: {'obj1': 'unnamed', 'obj2': 'unnamed'} Next I ...
VP.'s user avatar
  • 16.1k
5 votes
2 answers
5k views

How to replace synchronized, wait, notify by semaphores? (Producer-Consumer)

Good evening, I am wondering how I can replace synchronized, wait and notify in the following code by semaphores? And where do I have to create the semaphore variable? import java.util.*; ...
David's user avatar
  • 131
0 votes
1 answer
534 views

How to enable multi BluetoothGattDescriptor in Android 4.3?

I'm writing some code to get TI Keyfob(cc2540) accelerator data. There are 3 CharacteristicNotifications should be enabled. I set them one by one and enabled the BluetoothGattDescriptor, but after ...
IascCHEN's user avatar
1 vote
1 answer
616 views

OnMouseOver notification for my form

This is what I need to accomplish: For a form fields that need validation, when cursor stops at that field the instructions for correct input format should show up. What I am currently attempting ...
Mookie's user avatar
  • 37
8 votes
2 answers
708 views

Java: two WAITING + one BLOCKED threads, notify() leads to a livelock, notifyAll() doesn't, why?

I was trying to implement something similar to Java's bounded BlockingQueue interface using Java synchronization "primitives" (synchronized, wait(), notify()) when I stumbled upon some behavior I don'...
starikoff's user avatar
  • 1,629
4 votes
1 answer
4k views

How do I pause Threads properly with wait() and notify()

I want to have a class that starts a Thread and provides methods to pause and continue this Thread. My first approach was to have flag, which loops a sleep method as long as the value is true. ...
flxh's user avatar
  • 565
0 votes
1 answer
132 views

Stuck on multithreading java

So this code is giving multiple errors in main. Can someone tell me whats wrong with this? the question is to create consumer and producer threads to make a lamp. only two consumers are allowed and ...
Anna's user avatar
  • 1
0 votes
2 answers
147 views

notify threads in a different Object

How do I notify a thread from one object to another in the below program without using synchronized methods in the following producer and consumer problem. I am using a queue class for the put and ...
Raghav Kishan's user avatar
0 votes
1 answer
1k views

Java threads starting other threads, each writing into array

Completely new to Java, however I have to, somehow, make this work. I hope You guys can get me on the right path. The program has to create N threads and an array of N elements. The first thread ...
GytisK's user avatar
  • 169
0 votes
2 answers
96 views

Notify and Wait in Java

i have a problem with notify() and wait(). I want my main thread to be able to force other thread to wait and notify whenever i want to. It seems i dont understand everything because notify doesnt ...
user3402584's user avatar
0 votes
0 answers
2k views

Swift/BLE Notifications not working

I am using the Ti sensortag to play around with bluetooth and sensors. My goal is to get the barometer and the buttons working. The buttons notify when pressed but the barometer never notifies or ...
gimba's user avatar
  • 511
0 votes
4 answers
748 views

Thread not printing everything after notifyAll in java

class Lock implements Runnable{ int i=0; public synchronized void run(){ for(i=0;i<10;i++){ if(Thread.currentThread().getName().equals("t1") && i == 5) {try { this....
pk1991's user avatar
  • 23
1 vote
1 answer
415 views

wait() and notifyall() not working

Hello pleas help me with wait() and notifyall() I need it, cause of the do while repeat!, the function savegame() call over ion a server and after the function get an answer from the server, the other ...
JoJa's user avatar
  • 23
0 votes
1 answer
463 views

Android AlarmManager starts immediately

In my database I have a list of date and time in this format "yyyy-mm-dd hh: mm". At each date and time I want to start a corresponding notification. But instead the notification starts immediately. ...
user3608814's user avatar
1 vote
2 answers
581 views

What Wait() Actually means in Java ? I will Wait or You Wait?

As my understanding, if I am thread then: When I call notify()/notifyAll() it means means I am sending a signal to other thread which are waiting on this object monitor. Am I right? But What the ...
Saif's user avatar
  • 6,912
1 vote
4 answers
1k views

notify me when a script is done

I am using Linux. So I have my run.sh as this: #!/bin/bash echo "Started" ./eg Datasets/Klein_nb_P100000_dim100.txt 50 1 5 0 100 1 0 ./eg Datasets/Klein_nb_P100000_dim100.txt 50 1 5 0 100 2 1 .. ...
gsamaras's user avatar
  • 72.7k
0 votes
1 answer
861 views

Substitute for wait and notify in java

Is there any substitute for wait/notify in java ? I have two threads: thread1: run() { while(true) { data = getDataFromDatabase() changedData = performSomeChanges(data) ...
user109447's user avatar
  • 1,099
1 vote
1 answer
5k views

IllegalMonitorStateException on notify() when synchronized on an Integer

I'm new to using wait() and notify() in Java and I'm getting an IllegalMonitorStateException. Main Code public class ThreadTest { private static Integer state = 0; public static void main(...
user3217229's user avatar
0 votes
1 answer
391 views

WebBrowser.LoadCompleted and WebBrowser.ScriptNotify not called for a NavigateToString

I'm trying to get UserAgent on Windows Phone 7 and Windows Phone 8 (Silverlight). var webBrowser = new WebBrowser(); webBrowser.IsScriptEnabled = true; webBrowser.Navigating += (sender, args) => ...
Cœur's user avatar
  • 37.9k
24 votes
4 answers
29k views

Fire trigger on update of columnA or ColumnB or ColumnC

I have the code to fire a trigger only on an update of a single specific column. The trigger is used to fire a function that will raise a postgres "notify" event, which I am listening for and will ...
Martin's user avatar
  • 837
2 votes
1 answer
198 views

ListView is not notifying

I am using a list fragment to in a customized navigation drawer. I want to change the color of a text view in the list item while pressing. I am passing item click position to adapter and notify the ...
Anu's user avatar
  • 1,305
0 votes
1 answer
74 views

Thread communication: wait()/notifyAll()

I'm currently reading about Threads in Java and playing around with the wait() and notifyAll() methods. I'm trying to understand this by coding a practical example, but I'm not getting the desired ...
yulai's user avatar
  • 741
0 votes
0 answers
148 views

Teaspoon unit test ember notify message with promise

I am testing this code, the syntax is in coffee script. functionName: -> a = @get('content') a.on('didUpdate', => @get("controllers.application").notify title: "...
user2751691's user avatar
-2 votes
1 answer
820 views

interthread communication with synchronization in java

I want to develop an application that contains two threads thread1 and thread2. Thread 1 has to print even numbers upto 50 and thread 2 has to print odd numbers upto 50. And both threads should ...
Muthyala Naresh's user avatar
1 vote
1 answer
462 views

how to dynamically set Notify Filter for file system watcher in VB.NET

I have values being pulled from a database that specify if the user has selected a specific notify filter to be associated with the file system watcher. My question is if the user has specified ...
user3228174's user avatar
1 vote
1 answer
333 views

Java async servlet: Wait for a specific event

EDIT: Edited the question in response to @maress answer below. I have a web service in java (async enabled), which when called performs a call to another service asynchronously. In my Controller I ...
Hasib Samad's user avatar
  • 1,081
0 votes
1 answer
171 views

Program1.run(Program2); HowTo: Program2.finish()?Program1.continue():Program1.wait();

I have two Java programs. The "first"/"Main" one implements a search algorithm and the "other"/"second" one uses Repast simulation framework for running a Multi-agent simulation. In the "first" Java ...
Evan's user avatar
  • 207
28 votes
4 answers
14k views

Android: After creating a new notification, the older one is replaced

I want to create a notification without canceling/deleting previous notifications from my app. Here is my code for creating a notification: private void notification(Context context, String title, ...
M.Veli's user avatar
  • 519
0 votes
1 answer
190 views

Java multi-threaded Server notify() IllegalMonitorStateException

I have this code if( id == 0 ||(id % 2) != 0){ System.out.println("test"); synchronized(lock) { try { out1.println("Wait for another player..."); ...
user avatar
0 votes
3 answers
2k views

Notify() Not Working with Wait()

I am new to threads and learning but in the code below why notify is not working. As per my understanding notify should execute the main thread and print the total when i=5. Please correct if i am ...
vinaybhatoa's user avatar
0 votes
1 answer
3k views

Postgresql notify and listen [closed]

Hi every one I'm doing a small program to listen and notify using POSTGRESQL and JAVA. I just want to get notification message, to be stored in a file or MySQL database. Can any one guide me where I ...
ershad's user avatar
  • 35
0 votes
1 answer
257 views

How to make main method of a class wait on GUI actionPerformed

I am using a while loop in the main method of one class that continuously prompts the user to enter a name, then opens a new window (created with a separate class I wrote that extends Panel) and ...
user3730545's user avatar
1 vote
4 answers
116 views

Is there any difference between thread and runnable when using notify in Java?

When I try to do some test about notify() in Java, I found some confusion. Here I have two thread b1 and b2, they have the reference to another thread a. In b1 and b2, they will call wait(). And in ...
lee's user avatar
  • 129
0 votes
2 answers
42 views

Scheduling animations in order

I am making a game with dice and a moving piece. What I want is the dice to roll and then after the dice are finished rolling i want the piece to move. I currently have when the dice finish rolling ...
user3066916's user avatar
-1 votes
2 answers
641 views

How to pause and resume a thread in Java game development

I need to know how to pause a thread and resume it after checking a condition. Thread t = new Thread () { public void run() { while(true) { update(); repaint(); try { ...
user3705482's user avatar
1 vote
2 answers
5k views

IllegalMonitorStateException calling wait() and notify()

I've read the example of producer and consumer, and I changed a little. Pro() will print "first", and con() will print "second". I want every "second" appears after "first". public class test { ...
Sentimental's user avatar
0 votes
1 answer
116 views

Notify when control name changes

I am using Visual Studio 2010 (C#) and have created a user control inherited from a textbox. I need to be able to detect when the control's name changes so that I can execute some other code. TIA
OldDog's user avatar
  • 359
1 vote
4 answers
889 views

Confusion on Wait ,Notify and Sleep

I have a simple program which I am finding very confusing. The code snippet is as follows: class Processor{ public void produce() Throws InterruptedException{ synchronized(this){ ...
theimpatientcoder's user avatar
2 votes
2 answers
281 views

Difficult in understanding Interthread Communication

Can anyone explain this program on inter-thread communication? // A correct implementation of a producer and consumer. class Q { int n; boolean valueSet = false; synchronized int get() { ...
sweet_revathy569's user avatar
0 votes
4 answers
84 views

Specific issue with java multithreading

I'm running into a specific problem with java threads and am not sure how to solve it. The following code is part of a larger project. It's supposed to loop through a list of strings (e.g. >1000 ...
Jake's user avatar
  • 143
3 votes
2 answers
134 views

Where does the thread execution begin when it is notified by another thread?

public void add(int num) { synchronized(myObject){ // line 1 //line 2 while(!condition) { myObject.wait(); //line 3 } //line 4 //line 5 //line 6 } } When a thread T (waiting for ...
Neo's user avatar
  • 4,368
-2 votes
2 answers
186 views

How does Java's notify work?

When calling notify() in a thread in which there are multiple instances waiting, how does Java(or JVM) choose which thread to wake up?
fletch254's user avatar
3 votes
2 answers
1k views

How to make an Android class wait until another class completes its task?

I'm writing an Android messaging application, and 1 class is calling another class, and I wish for the calling class to wait for the callee class to complete before carrying on. Caller Class (...
user1118764's user avatar
  • 9,555
0 votes
1 answer
174 views

Java: Can I send Thread.wait() and Thread.notify() on the PipedOutputStream?

Can I send from the Producer Thread on PipedOutputStream the wait()-Signal to the Receiver Thread, so that the Receiver "sleeps" until the notify()-Singal comes from the Producer Thread? The Task is ...
user avatar

1
7 8
9
10 11
16