TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David
NA
5
0
Make asynchronous method synchronous
Dec 6 2006 4:36 PM
Does anybody have any ideas on a way to make an asynchronous method behave in a synchronous way? I will not go in to much detail about what I am doing because it would take a long time.
Basically I have a method that I call which performs a function and, when complete, raises an event method(delegate). This is just like how the Ping object's SendAsync method works, to give one example. The problem is, I need to be able to make this function behave synchronously.
The best I have been able to come up with so far is to call the asynchronous function, and loop until some variable is changed when the delegate method is raised. That seems messy to me though.
Can anybody think of a better way? This is kind of hard for me to explain. If it is not clear, let me know and I will try a different way.
Reply
Answers (
0
)
Help on two things: Upgrade & Merge files
Getting MP3 duration