~ubuntu-branches/ubuntu/saucy/glib2.0/saucy-proposed

« back to all changes in this revision

Viewing changes to gio/gthreadedsocketservice.c

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2013-06-25 12:43:56 UTC
  • mfrom: (1.63.22)
  • Revision ID: package-import@ubuntu.com-20130625124356-597xf4lpikauchiy
Tags: 2.37.3-1ubuntu1
* Resynchronise on unrelease Debian SVN (glib is in NEW there). Remaining
  change:
  - Build-Depend on python:any for cross building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
#include "gthreadedsocketservice.h"
51
51
#include "glibintl.h"
52
52
 
 
53
struct _GThreadedSocketServicePrivate
 
54
{
 
55
  GThreadPool *thread_pool;
 
56
  int max_threads;
 
57
  gint job_count;
 
58
};
53
59
 
54
60
static guint g_threaded_socket_service_run_signal;
55
61
 
56
 
G_DEFINE_TYPE (GThreadedSocketService,
57
 
               g_threaded_socket_service,
58
 
               G_TYPE_SOCKET_SERVICE);
 
62
G_DEFINE_TYPE_WITH_PRIVATE (GThreadedSocketService,
 
63
                            g_threaded_socket_service,
 
64
                            G_TYPE_SOCKET_SERVICE)
59
65
 
60
66
enum
61
67
{
63
69
  PROP_MAX_THREADS
64
70
};
65
71
 
66
 
 
67
72
G_LOCK_DEFINE_STATIC(job_count);
68
73
 
69
 
struct _GThreadedSocketServicePrivate
70
 
{
71
 
  GThreadPool *thread_pool;
72
 
  int max_threads;
73
 
  gint job_count;
74
 
};
75
 
 
76
74
typedef struct
77
75
{
78
76
  GThreadedSocketService *service;
136
134
static void
137
135
g_threaded_socket_service_init (GThreadedSocketService *service)
138
136
{
139
 
  service->priv = G_TYPE_INSTANCE_GET_PRIVATE (service,
140
 
                                               G_TYPE_THREADED_SOCKET_SERVICE,
141
 
                                               GThreadedSocketServicePrivate);
 
137
  service->priv = g_threaded_socket_service_get_instance_private (service);
142
138
  service->priv->max_threads = 10;
143
139
}
144
140
 
212
208
  GObjectClass *gobject_class = G_OBJECT_CLASS (class);
213
209
  GSocketServiceClass *ss_class = &class->parent_class;
214
210
 
215
 
  g_type_class_add_private (class, sizeof (GThreadedSocketServicePrivate));
216
 
 
217
211
  gobject_class->constructed = g_threaded_socket_service_constructed;
218
212
  gobject_class->finalize = g_threaded_socket_service_finalize;
219
213
  gobject_class->set_property = g_threaded_socket_service_set_property;