Android: AsyncTask how to use wait/notify

Is it possible to call wait & notify inside an AsyncTask? So far, I tried to use them but all it does to block the AsyncTask forever. How can I overcome this? My usage is: I have a camera frame generated, and I want to send it to server continously however, I want to make something better than

while( true){
 if (frameAvaialble){

Which drains useless CPU power.


You can try ConditionVariable,

private ConditionVariable mCondition = new ConditionVariable(false);

while( true ){

//other code
frameAvaialble = true;;

Need Your Help

calling C main from Objectivec

objective-c c parameters parameter-passing main

I want to call a C classes main function from within another class (which is written with objectiveC). I would like to pass some arguments to the main. I tried it like this, but the frist parameter...

Sorting of Gridview data

c# gridview

I have A Grid view and I want to sort the Gridview .I tried severel methods from google and they are not working in my side.

Parsing strings with regex into different patterns


Could someone show me a correct syntax. The complete string should consist of only numbers and characters and whitespaces in each pattern except in type. The type and one parm are mandatory. The

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.