# Synchronization problem in AS3

**URL:** <https://forum.kirupa.com/t/synchronization-problem-in-as3/247270>\
**Category:** flash\
**Created:** [December 20, 2007, 1:05pm UTC](https://forum.kirupa.com/t/synchronization-problem-in-as3/247270 "2007-12-20T13:05:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spiderbox\_am](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@spiderbox\_am](https://forum.kirupa.com/u/spiderbox_am)\
**Post date:** [December 20, 2007, 1:05pm UTC](https://forum.kirupa.com/t/synchronization-problem-in-as3/247270/1 "2007-12-20T13:05:03Z")

</div>

Hi everybody.  
I have one problem with synchronization of write functions…  
The problem:  
There exist socket A.  
There are many event handlers in my program which can directly write bytearrays to socket A. So the problem is how can I do the synchronization or are sockets thread safe ?  
If 2 functions(handlers) will start to write into the same socket what will happen ?  
This is a very important problem if you are Flex/Flash programmer/developer.  
Thanks ever so.
