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.

754 questions
11
votes
4 answers

call notify balloon message in windows 7 from cmd?

I need to create a notification balloon message in Windows 7 from the Command prompt with custom text. I have searched Google and found shell32.
jozi
  • 2,833
  • 6
  • 28
  • 41
11
votes
3 answers

How do you notify a handler in Ansible based solely on a conditional?

I would like to notify a handler in my role by doing something like this: - name: Notify handler notify: my_handler when: this_thing_is_true|bool But Ansible just whines: ERROR! no module/action detected in task. I have tried various wedges,…
fbicknel
  • 1,219
  • 13
  • 21
11
votes
1 answer

Registering change notification with Active Directory using C#

This link http://msdn.microsoft.com/en-us/library/aa772153(VS.85).aspx says: You can register up to five notification requests on a single LDAP connection. You must have a dedicated thread that waits for the notifications and processes them quickly.…
Sam
  • 276
  • 1
  • 2
  • 13
11
votes
4 answers

Android java.lang.IllegalMonitorStateException: object not locked by thread before wait()

I define a global static object as a synchronization lock. public static Object ConfirmationSynObj = new Object(); The following function is what I wrote, but it throw a IllegalMonitorStateException. synchronized (Config.ConfirmationSynObj)…
Folee
  • 179
  • 1
  • 1
  • 8
11
votes
4 answers

Can notify wake up the same thread multiple times?

Imagine you have a typical producer-consumer pattern in Java. To be a bit more efficient you want to use notify() and not notifyAll() when a new element is added to the queue. If two producer threads invoke notify, is it guaranteed that two distinct…
Franz Kafka
  • 10,623
  • 20
  • 93
  • 149
10
votes
1 answer

IllegalMonitorStateException notify() and wait()

I have a problem. When I use notify() in a synchronized block I get IllegalMonitorStateException. Can anyone help me solve this problem? I need one thread to send a char to a second thread, then this thread has to wait and second thread print this…
Sylwek
  • 856
  • 1
  • 9
  • 24
9
votes
1 answer

How to fix Naked notify warning of FindBugs?

I have Naked notify warning of FindBugs. The below is my code. synchronized (this) { this.notify(); } The "this" is "public class Controller extends Thread". How to fix the warning?? I have no idea for it. Thanks in advance.
mooongcle
  • 3,987
  • 5
  • 33
  • 42
9
votes
3 answers

What is the difference between wait/notify and wait/interrupt?

synchronized (Foo.class) { while (someCondition) { try { Foo.class.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } } It seems that this thread both wakes when…
Hải Phong
  • 5,094
  • 6
  • 31
  • 49
9
votes
4 answers

WPF custom DependencyProperty notify changes

I have a class called MyComponent and it has a DependencyProperty caled BackgroundProperty. public class MyComponent { public MyBackground Background { get { return (MyBackground)GetValue(BackgroundProperty); } set {…
morsanu
  • 975
  • 20
  • 35
8
votes
2 answers

who and when notify the thread.wait() when thread.join() is called?

thread.join() will call thread.wait(), but who and when notifies (either with thread.notify() or notifyAll()) the thread.wait()? As we know, thread join will wait for the thread to be completed, but who calls notify on it?
jiafu
  • 6,338
  • 12
  • 49
  • 73
8
votes
7 answers

A good small example to demonstrate wait() and notify() method in java

Can anybody please provide me a good small example demonstrate wait() and notify() functionality in java. I've tried with the below piece of code but it's not showing what i expected. public class WaitDemo { int i = 10; int display() { …
Sourav Bag
  • 339
  • 2
  • 4
  • 10
8
votes
7 answers

using Object as a mutex in java

Hello there good poeple, I need some help. I'm writing a music player which streams music from the web. If I pres the play button before the music is done buffering I want it to wait. I tried doing something like this: Object mutex = new…
Martin Hansen
  • 571
  • 4
  • 8
  • 14
8
votes
4 answers

How can I display something during the execution of a SQL script on SQLServer?

For example. I have a database upgrade script for adding a column to a database table. It looks a little like this: IF NOT Exists(SELECT * FROM SysColumns sc, SysObjects so WHERE sc.Name = 'dealer_number' AND so.Name =…
Ron Tuffin
  • 53,859
  • 24
  • 66
  • 78
8
votes
3 answers

Calling a sd_notify(0, "WATCHDOG=1") in a service

I have a sys d service. I want to implement a watch dog for that. It's something like, [Unit] Description=Watchdog example service [Service] Type=notify Environment=NOTIFY_SOCKET=/run/%p.sock ExecStartPre=-/usr/bin/docker kill…
pnv
  • 2,985
  • 5
  • 29
  • 36
8
votes
4 answers

java: wait(), notify() and synchronized blocks

I learned that calling an Object's wait() method will release the object monitor, if present. But I have some questions regarding calling notify() on this object by another thread: (when) will the waiting thread wake up, if another (a 3rd) thread…
MRalwasser
  • 15,605
  • 15
  • 101
  • 147
1 2
3
50 51