/// <summary>
        /// Bind this RenderKernelService to a specific object name space.
        /// </summary>
        /// <param name="sObjectNameSpace">
        /// A <see cref="Guid"/> that specify the object name space used.
        /// </param>
        private void BindObjectNameSpace(Guid sObjectNameSpace)
        {
            if ((mObjectNameSpace != Guid.Empty) && (mObjectNameSpace != sObjectNameSpace))
            {
                throw new InvalidOperationException("service cannot be bound to two object name spaces");
            }
            // Set object name space for this RenderKernelService
            mObjectNameSpace = sObjectNameSpace;

            lock (sKernelServicesLock) {
                GraphicsKernelService service = GetService(sObjectNameSpace, mServiceName);

                if (service == null)
                {
                    List <GraphicsKernelService> services = (sKernelServices.ContainsKey(mObjectNameSpace) == true) ?
                                                            sKernelServices[mObjectNameSpace] :
                                                            new List <GraphicsKernelService>()
                    ;

                    // Append this service to the services bound to this
                    services.Add(this);

                    sKernelServices[mObjectNameSpace] = services;
                }
            }
        }
        /// <summary>
        /// Unbind this RenderKernelService from a specific object name space.
        /// </summary>
        /// <param name="sObjectNameSpace">
        /// A <see cref="Guid"/> that specify the object name space used.
        /// </param>
        private void UnbindObjectNameSpace(Guid sObjectNameSpace)
        {
            lock (sKernelServicesLock) {
                if (sKernelServices.ContainsKey(mObjectNameSpace) == false)
                {
                    throw new ArgumentException("unknown object name space", "sObjectNameSpace");
                }

                GraphicsKernelService        service  = GetService(sObjectNameSpace, mServiceName);
                List <GraphicsKernelService> services = sKernelServices[mObjectNameSpace];

                if (service == null)
                {
                    throw new InvalidOperationException("not bound to any object name space");
                }

                // Remove this service, if reference count is 0
                services.Remove(this);
                // List namespace list, if no service remains
                if (services.Count == 0)
                {
                    sKernelServices.Remove(mObjectNameSpace);
                }
                // No object name space bound (no more referencing context)
                mObjectNameSpace = Guid.Empty;
            }
        }
        /// <summary>
        /// Main routine for every RenderKernelService thread.
        /// </summary>
        /// <param name="data"></param>
        private static void KernelServiceMain(object data)
        {
            object[] args = (object[])data;
            GraphicsKernelService kService = (GraphicsKernelService)args[0];
            GraphicsContext       ctx      = (GraphicsContext)args[1];

            // Make the context current
            if (ctx != null)
            {
                ctx.MakeCurrent(true);
            }

            // Execute this service in another thread
            kService.ThreadExecute(ctx);

            // Dispose current context, if any
            if (ctx != null)
            {
                ctx.Dispose();
            }
        }